test_class.declarator: LARGE_OFFSET = 17000
test_class.modifier: private static final
test_class.original_string: private static final int LARGE_OFFSET = 17000;
test_class.type: int
test_class.var_name: LARGE_OFFSET
test_class.declarator: EXPECTED_NR_LRPS_LONG_LINE = 5
test_class.modifier: private static final
test_class.original_string: private static final int EXPECTED_NR_LRPS_LONG_LINE = 5;
test_class.type: int
test_class.var_name: EXPECTED_NR_LRPS_LONG_LINE
test_class.declarator: LONG_LINE_IDS = {19, 24, 25}
test_class.modifier: private static final
test_class.original_string: private static final long[] LONG_LINE_IDS = {19, 24, 25};
test_class.type: long[]
test_class.var_name: LONG_LINE_IDS
test_class.declarator: mockery = new Mockery()
test_class.modifier: private
test_class.original_string: private Mockery mockery = new Mockery();
test_class.type: Mockery
test_class.var_name: mockery
test_class.declarator: td = TestData.getInstance()
test_class.modifier: private
test_class.original_string: private TestData td = TestData.getInstance();
test_class.type: TestData
test_class.var_name: td
test_class.file: encoder/src/test/java/openlr/encoder/OpenLREncoderTest.java
test_class.identifier: OpenLREncoderTest
test_case.body: @Test
      public final void testInvalidLocationType() {
  
          final Location mockedLocRef = mockery.mock(Location.class,
                  "invalidType");
          final String id = "locID";
  
          mockery.checking(new Expectations() {
              {
                  allowing(mockedLocRef).getLocationType();
                  will(returnValue(LocationType.UNKNOWN));
              }
          });
          mockery.checking(new Expectations() {
              {
                  allowing(mockedLocRef).getID();
                  will(returnValue(id));
              }
          });
  
          LocationReferenceHolder result = encodeLocation(mockedLocRef);
          assertFalse(result.isValid());
          // while we're at it we check the toString method of
          // DecoderReturnCode
          assertSame(result.getReturnCode().toString(),
                  EncoderReturnCode.INVALID_LOCATION_TYPE.toString());
          assertEquals(result.getID(), id);
          assertNotNull(result.toString());
      }
test_case.class_method_signature: OpenLREncoderTest.testInvalidLocationType()
test_case.full_signature: @Test public final void testInvalidLocationType()
test_case.identifier: testInvalidLocationType
test_case.invocations: mock checking getLocationType allowing will returnValue checking getID allowing will returnValue encodeLocation assertFalse isValid assertSame toString getReturnCode toString assertEquals getID assertNotNull toString
test_case.modifiers: @Test public final
test_case.parameters: ()
test_case.return: void
test_case.signature: void testInvalidLocationType()
focal_class.declarator: LOG = Logger.getLogger(OpenLREncoder.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = Logger.getLogger(OpenLREncoder.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: VERSION = VersionHelper.getVersion("encoder")
focal_class.modifier: private final
focal_class.original_string: private final Version VERSION = VersionHelper.getVersion("encoder");
focal_class.type: Version
focal_class.var_name: VERSION
focal_class.file: encoder/src/main/java/openlr/encoder/OpenLREncoder.java
focal_class.identifier: OpenLREncoder
focal_class.interfaces: implements openlr.OpenLREncoder
focal_class.class_method_signature: OpenLREncoder.getPhysicalEncoderServices()
focal_class.full_signature: public static List<PhysicalEncoder> getPhysicalEncoderServices()
focal_class.identifier: getPhysicalEncoderServices
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: List<PhysicalEncoder>
focal_class.signature: List<PhysicalEncoder> getPhysicalEncoderServices()
focal_class.class_method_signature: OpenLREncoder.encodeLocations(
              final OpenLREncoderParameter parameter, final List<Location> loc)
focal_class.full_signature: @Override public List<LocationReferenceHolder> encodeLocations(
              final OpenLREncoderParameter parameter, final List<Location> loc)
focal_class.identifier: encodeLocations
focal_class.modifiers: @Override public
focal_class.parameters: (
              final OpenLREncoderParameter parameter, final List<Location> loc)
focal_class.return: List<LocationReferenceHolder>
focal_class.signature: List<LocationReferenceHolder> encodeLocations(
              final OpenLREncoderParameter parameter, final List<Location> loc)
focal_class.class_method_signature: OpenLREncoder.encodeLocation(
              final OpenLREncoderParameter parameter, final Location loc)
focal_class.full_signature: @Override public LocationReferenceHolder encodeLocation(
              final OpenLREncoderParameter parameter, final Location loc)
focal_class.identifier: encodeLocation
focal_class.modifiers: @Override public
focal_class.parameters: (
              final OpenLREncoderParameter parameter, final Location loc)
focal_class.return: LocationReferenceHolder
focal_class.signature: LocationReferenceHolder encodeLocation(
              final OpenLREncoderParameter parameter, final Location loc)
focal_class.class_method_signature: OpenLREncoder.encodeLocation(
              final OpenLREncoderParameter parameter,
              final OpenLREncoderProperties properties, final Location loc)
focal_class.full_signature: private LocationReferenceHolder encodeLocation(
              final OpenLREncoderParameter parameter,
              final OpenLREncoderProperties properties, final Location loc)
focal_class.identifier: encodeLocation
focal_class.modifiers: private
focal_class.parameters: (
              final OpenLREncoderParameter parameter,
              final OpenLREncoderProperties properties, final Location loc)
focal_class.return: LocationReferenceHolder
focal_class.signature: LocationReferenceHolder encodeLocation(
              final OpenLREncoderParameter parameter,
              final OpenLREncoderProperties properties, final Location loc)
focal_class.class_method_signature: OpenLREncoder.getMajorVersion()
focal_class.full_signature: @Override public String getMajorVersion()
focal_class.identifier: getMajorVersion
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getMajorVersion()
focal_class.class_method_signature: OpenLREncoder.getMinorVersion()
focal_class.full_signature: @Override public String getMinorVersion()
focal_class.identifier: getMinorVersion
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getMinorVersion()
focal_class.class_method_signature: OpenLREncoder.getPatchVersion()
focal_class.full_signature: @Override public String getPatchVersion()
focal_class.identifier: getPatchVersion
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPatchVersion()
focal_class.class_method_signature: OpenLREncoder.getVersion()
focal_class.full_signature: @Override public String getVersion()
focal_class.identifier: getVersion
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getVersion()
focal_method.body: @Override
      public LocationReferenceHolder encodeLocation(
              final OpenLREncoderParameter parameter, final Location loc)
              throws OpenLRProcessingException {
          return encodeLocation(parameter,
                  new OpenLREncoderProperties(parameter.getConfiguration(), parameter.getPhysicalEncoders()), loc);
      }
focal_method.class_method_signature: OpenLREncoder.encodeLocation(
              final OpenLREncoderParameter parameter, final Location loc)
focal_method.full_signature: @Override public LocationReferenceHolder encodeLocation(
              final OpenLREncoderParameter parameter, final Location loc)
focal_method.identifier: encodeLocation
focal_method.invocations: encodeLocation getConfiguration getPhysicalEncoders
focal_method.modifiers: @Override public
focal_method.parameters: (
              final OpenLREncoderParameter parameter, final Location loc)
focal_method.return: LocationReferenceHolder
focal_method.signature: LocationReferenceHolder encodeLocation(
              final OpenLREncoderParameter parameter, final Location loc)