test_class.declarator: polygonDecoder = new PolygonDecoder()
test_class.modifier: private
test_class.original_string: private PolygonDecoder polygonDecoder = new PolygonDecoder();
test_class.type: PolygonDecoder
test_class.var_name: polygonDecoder
test_class.file: proto/src/test/java/openlr/proto/decoder/PolygonDecoderTest.java
test_class.identifier: PolygonDecoderTest
test_case.body: @Test
      public void testMissingLocationReference() {
          LocationReferenceData locationReferenceData = LocationReferenceData.newBuilder()
                  .build();
  
          try {
              polygonDecoder.decode("1", locationReferenceData);
              fail();
          } catch (PhysicalFormatException e) {
              assertEquals(e.getErrorCode(), OpenLRProtoStatusCode.MISSING_LOCATION_REFERENCE);
          }
      }
test_case.class_method_signature: PolygonDecoderTest.testMissingLocationReference()
test_case.full_signature: @Test public void testMissingLocationReference()
test_case.identifier: testMissingLocationReference
test_case.invocations: build newBuilder decode fail assertEquals getErrorCode
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMissingLocationReference()
focal_class.file: proto/src/main/java/openlr/proto/decoder/PolygonDecoder.java
focal_class.identifier: PolygonDecoder
focal_class.interfaces: implements LocationReferenceDecoder
focal_class.class_method_signature: PolygonDecoder.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.hasPolygonLocationReference()) {
              throw new OpenLRProtoException(OpenLRProtoStatusCode.MISSING_LOCATION_REFERENCE);
          }
  
          PolygonLocationReference polygonLocationReference = data.getPolygonLocationReference();
  
          if (polygonLocationReference.getCoordinatesCount() == 0) {
              throw new OpenLRProtoException(OpenLRProtoStatusCode.INVALID_LOCATION_REFERENCE);
          }
  
          List<GeoCoordinates> cornerPoints = new ArrayList<>();
  
          for (Coordinates coordinates : polygonLocationReference.getCoordinatesList()) {
              GeoCoordinatesProtoImpl cornerPoint = new GeoCoordinatesProtoImpl(coordinates.getLongitude(), coordinates.getLatitude());
              cornerPoints.add(cornerPoint);
          }
  
          return new RawPolygonLocRef(id, cornerPoints);
      }
focal_method.class_method_signature: PolygonDecoder.decode(String id, LocationReferenceData data)
focal_method.full_signature: @Override public RawLocationReference decode(String id, LocationReferenceData data)
focal_method.identifier: decode
focal_method.invocations: hasPolygonLocationReference getPolygonLocationReference getCoordinatesCount getCoordinatesList getLongitude getLatitude add
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)