@Test
public void testLineLocationReference() throws PhysicalFormatException {

    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();
    Coordinates lastCoordinates = Coordinates.newBuilder()
            .setLongitude(3)
            .setLatitude(4)
            .build();
    LineAttributes lastLineAttributes = LineAttributes.newBuilder()
            .setBearing(270)
            .setFrc(FRC.FRC_1)
            .setFow(FOW.FOW_MULTIPLE_CARRIAGEWAY)
            .build();
    LocationReferencePoint last = LocationReferencePoint.newBuilder()
            .setCoordinates(lastCoordinates)
            .setLineAttributes(lastLineAttributes)
            .build();
    LineLocationReference lineLocationReference = LineLocationReference.newBuilder()
            .addLocationReferencePoints(first)
            .addLocationReferencePoints(last)
            .setPositiveOffset(1)
            .setNegativeOffset(2)
            .build();
    LocationReferenceData locationReferenceData = LocationReferenceData.newBuilder()
            .setLineLocationReference(lineLocationReference)
            .build();
    LocationReference locationReference = new LocationReferenceProtoImpl("1", LocationType.LINE_LOCATION, locationReferenceData);
    RawLocationReference rawLocationReference = decoder.decodeData(locationReference);
    assertNotNull(rawLocationReference);
    assertEquals(rawLocationReference.getID(), "1");
    assertEquals(rawLocationReference.getLocationType(), LocationType.LINE_LOCATION);
    assertTrue(rawLocationReference.isValid());
}