@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);
}