test_class.declarator: geoCoordinatesEncoder = new GeoCoordinatesEncoder()
test_class.original_string: GeoCoordinatesEncoder geoCoordinatesEncoder = new GeoCoordinatesEncoder();
test_class.type: GeoCoordinatesEncoder
test_class.var_name: geoCoordinatesEncoder
test_class.file: proto/src/test/java/openlr/proto/encoder/GeoCoordinatesEncoderTest.java
test_class.identifier: GeoCoordinatesEncoderTest
test_case.body: @Test
      public void testEncodeGeoCoordinates() throws OpenLRProtoException {
          GeoCoordinatesProtoImpl geoCoordinates = new GeoCoordinatesProtoImpl(7.3, 52.5);
          RawGeoCoordLocRef rawLocationReference = new RawGeoCoordLocRef("1", geoCoordinates);
  
          LocationReference locationReference = geoCoordinatesEncoder.encode(rawLocationReference);
  
          assertNotNull(locationReference);
          assertEquals(locationReference.getID(), "1");
          assertEquals(locationReference.getLocationType(), LocationType.GEO_COORDINATES);
          assertEquals(locationReference.getDataIdentifier(), "proto");
          assertEquals(locationReference.getDataClass(), LocationReferenceData.class);
  
          assertNotNull(locationReference);
          assertEquals(locationReference.getID(), "1");
          assertEquals(locationReference.getLocationType(), LocationType.GEO_COORDINATES);
          assertTrue(locationReference.isValid());
          assertEquals(locationReference.getDataClass(), LocationReferenceData.class);
  
          Object locationReferenceData = locationReference.getLocationReferenceData();
  
          assertTrue(locationReferenceData instanceof LocationReferenceData);
  
          LocationReferenceData data = (LocationReferenceData) locationReferenceData;
  
          assertTrue(data.hasGeoCoordinatesLocationReference());
  
          GeoCoordinatesLocationReference geoCoordinatesLocationReference = data.getGeoCoordinatesLocationReference();
  
          assertTrue(geoCoordinatesLocationReference.hasCoordinates());
  
          Coordinates coordinates = geoCoordinatesLocationReference.getCoordinates();
  
          assertEquals(coordinates.getLongitude(), 7.3);
          assertEquals(coordinates.getLatitude(), 52.5);
      }
test_case.class_method_signature: GeoCoordinatesEncoderTest.testEncodeGeoCoordinates()
test_case.full_signature: @Test public void testEncodeGeoCoordinates()
test_case.identifier: testEncodeGeoCoordinates
test_case.invocations: encode assertNotNull assertEquals getID assertEquals getLocationType assertEquals getDataIdentifier assertEquals getDataClass assertNotNull assertEquals getID assertEquals getLocationType assertTrue isValid assertEquals getDataClass getLocationReferenceData assertTrue assertTrue hasGeoCoordinatesLocationReference getGeoCoordinatesLocationReference assertTrue hasCoordinates getCoordinates assertEquals getLongitude assertEquals getLatitude
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEncodeGeoCoordinates()
focal_class.file: proto/src/main/java/openlr/proto/encoder/GeoCoordinatesEncoder.java
focal_class.identifier: GeoCoordinatesEncoder
focal_class.interfaces: implements LocationReferenceEncoder
focal_class.class_method_signature: GeoCoordinatesEncoder.encode(RawLocationReference rawLocationReference)
focal_class.full_signature: @Override public LocationReference encode(RawLocationReference rawLocationReference)
focal_class.identifier: encode
focal_class.modifiers: @Override public
focal_class.parameters: (RawLocationReference rawLocationReference)
focal_class.return: LocationReference
focal_class.signature: LocationReference encode(RawLocationReference rawLocationReference)
focal_method.body: @Override
      public LocationReference encode(RawLocationReference rawLocationReference) throws OpenLRProtoException {
          if (rawLocationReference.getLocationType() != LocationType.GEO_COORDINATES) {
              throw new OpenLRProtoException(OpenLRProtoStatusCode.INVALID_LOCATION_REFERENCE);
          }
  
          GeoCoordinates geoCoordinates = rawLocationReference.getGeoCoordinates();
  
          Coordinates coordinates = Coordinates.newBuilder()
                  .setLongitude(geoCoordinates.getLongitudeDeg())
                  .setLatitude(geoCoordinates.getLatitudeDeg())
                  .build();
  
          GeoCoordinatesLocationReference geoCoordinatesLocationReference = GeoCoordinatesLocationReference.newBuilder()
                  .setCoordinates(coordinates)
                  .build();
  
          LocationReferenceData locationReferenceData = LocationReferenceData.newBuilder()
                  .setGeoCoordinatesLocationReference(geoCoordinatesLocationReference)
                  .build();
  
          return new LocationReferenceProtoImpl(rawLocationReference.getID(), LocationType.GEO_COORDINATES, locationReferenceData);
      }
focal_method.class_method_signature: GeoCoordinatesEncoder.encode(RawLocationReference rawLocationReference)
focal_method.full_signature: @Override public LocationReference encode(RawLocationReference rawLocationReference)
focal_method.identifier: encode
focal_method.invocations: getLocationType getGeoCoordinates build setLatitude setLongitude newBuilder getLongitudeDeg getLatitudeDeg build setCoordinates newBuilder build setGeoCoordinatesLocationReference newBuilder getID
focal_method.modifiers: @Override public
focal_method.parameters: (RawLocationReference rawLocationReference)
focal_method.return: LocationReference
focal_method.signature: LocationReference encode(RawLocationReference rawLocationReference)