test_class.declarator: geoCoordinatesDecoder = new GeoCoordinatesDecoder()
test_class.original_string: GeoCoordinatesDecoder geoCoordinatesDecoder = new GeoCoordinatesDecoder();
test_class.type: GeoCoordinatesDecoder
test_class.var_name: geoCoordinatesDecoder
test_class.file: proto/src/test/java/openlr/proto/decoder/GeoCoordinatesDecoderTest.java
test_class.identifier: GeoCoordinatesDecoderTest
test_case.body: @Test
      public void testValidLocationReference() throws PhysicalFormatException {
          Coordinates coordinates = Coordinates.newBuilder()
                  .setLongitude(1.5)
                  .setLatitude(2.5)
                  .build();
  
          GeoCoordinatesLocationReference geoCoordinatesLocationReference = GeoCoordinatesLocationReference.newBuilder()
                  .setCoordinates(coordinates)
                  .build();
  
          LocationReferenceData locationReferenceData = LocationReferenceData.newBuilder()
                  .setGeoCoordinatesLocationReference(geoCoordinatesLocationReference)
                  .build();
  
          RawLocationReference rawLocationReference = geoCoordinatesDecoder.decode("1", locationReferenceData);
  
          assertNotNull(rawLocationReference);
          assertEquals("1", rawLocationReference.getID());
          assertEquals(LocationType.GEO_COORDINATES, rawLocationReference.getLocationType());
  
          GeoCoordinates geoCoordinates = rawLocationReference.getGeoCoordinates();
          assertNotNull(geoCoordinates);
          assertEquals(geoCoordinates.getLongitudeDeg(), 1.5);
          assertEquals(geoCoordinates.getLatitudeDeg(), 2.5);
      }
test_case.class_method_signature: GeoCoordinatesDecoderTest.testValidLocationReference()
test_case.full_signature: @Test public void testValidLocationReference()
test_case.identifier: testValidLocationReference
test_case.invocations: build setLatitude setLongitude newBuilder build setCoordinates newBuilder build setGeoCoordinatesLocationReference newBuilder decode assertNotNull assertEquals getID assertEquals getLocationType getGeoCoordinates assertNotNull assertEquals getLongitudeDeg assertEquals getLatitudeDeg
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testValidLocationReference()
focal_class.file: proto/src/main/java/openlr/proto/decoder/GeoCoordinatesDecoder.java
focal_class.identifier: GeoCoordinatesDecoder
focal_class.interfaces: implements LocationReferenceDecoder
focal_class.class_method_signature: GeoCoordinatesDecoder.decode(String id, LocationReferenceData data)
focal_class.full_signature: @Override public RawLocationReference decode(String id, LocationReferenceData data)
focal_class.identifier: decode
focal_class.modifiers: @Override public
focal_class.parameters: (String id, LocationReferenceData data)
focal_class.return: RawLocationReference
focal_class.signature: RawLocationReference decode(String id, LocationReferenceData data)
focal_method.body: @Override
      public RawLocationReference decode(String id, LocationReferenceData data) throws OpenLRProtoException {
          if (!data.hasGeoCoordinatesLocationReference()) {
              throw new OpenLRProtoException(OpenLRProtoStatusCode.MISSING_LOCATION_REFERENCE);
          }
  
          GeoCoordinatesLocationReference geoCoordinatesLocationReference = data.getGeoCoordinatesLocationReference();
  
          if (!geoCoordinatesLocationReference.hasCoordinates()) {
              throw new OpenLRProtoException(OpenLRProtoStatusCode.INVALID_LOCATION_REFERENCE);
          }
  
          Coordinates coordinates = geoCoordinatesLocationReference.getCoordinates();
          GeoCoordinatesProtoImpl geoCoordinates = new GeoCoordinatesProtoImpl(coordinates.getLongitude(), coordinates.getLatitude());
  
          return new RawGeoCoordLocRef(id, geoCoordinates);
      }
focal_method.class_method_signature: GeoCoordinatesDecoder.decode(String id, LocationReferenceData data)
focal_method.full_signature: @Override public RawLocationReference decode(String id, LocationReferenceData data)
focal_method.identifier: decode
focal_method.invocations: hasGeoCoordinatesLocationReference getGeoCoordinatesLocationReference hasCoordinates getCoordinates getLongitude getLatitude
focal_method.modifiers: @Override public
focal_method.parameters: (String id, LocationReferenceData data)
focal_method.return: RawLocationReference
focal_method.signature: RawLocationReference decode(String id, LocationReferenceData data)