    @Test
    public void testInvalidLocationReference() {

        Coordinates firstCoordinates = Coordinates.newBuilder()
                .setLongitude(1)
                .setLatitude(2)
                .build();

        LineAttributes firstLineAttributes = LineAttributes.newBuilder()
                .setBearing(90)
                .setFrc(FRC.FRC_0)
                .setFow(FOW.FOW_MOTORWAY)
                .build();

        PathAttributes firstPathAttributes = PathAttributes.newBuilder()
                .setDistanceToNext(100)
                .setLowestFrcAlongPath(FRC.FRC_1)
                .build();

        LocationReferencePoint first = LocationReferencePoint.newBuilder()
                .setCoordinates(firstCoordinates)
                .setLineAttributes(firstLineAttributes)
                .setPathAttributes(firstPathAttributes)
                .build();

        LineLocationReference lineLocationReference = LineLocationReference.newBuilder()
                .addLocationReferencePoints(first)
                .setPositiveOffset(1)
                .setNegativeOffset(2)
                .build();

        LocationReferenceData locationReferenceData = LocationReferenceData.newBuilder()
                .setLineLocationReference(lineLocationReference)
                .build();

        LocationReference locationReference = new LocationReferenceProtoImpl("1", LocationType.LINE_LOCATION, locationReferenceData);

        try {
            decoder.decodeData(locationReference);
            fail();
        } catch (PhysicalFormatException e) {
            assertEquals(e.getErrorCode(), OpenLRProtoStatusCode.INVALID_LOCATION_REFERENCE);
        }
    }