@Test
public final void testInvalidLocationType() {

    final RawLocationReference mockedLocRef = new RawInvalidLocRef("id",
            null, LocationType.UNKNOWN);
    try {
        OpenLRDecoder decoder = new OpenLRDecoder();
        OpenLRDecoderParameter parameter = new OpenLRDecoderParameter.Builder()
                .with(mockedMapDB)
                .with(td.getProperties()).buildParameter();
        Location result = decoder.decodeRaw(parameter, mockedLocRef);
        assertFalse(result.isValid());
        // while we're at it we check the toString method of DecoderReturnCode
        assertEquals(result.getReturnCode(),
                DecoderReturnCode.INVALID_LOCATION_TYPE);
        assertNull(result.getAccessPoint());
        assertNull(result.getPointLocation());
        assertNull(result.getPoiLine());
        assertNull(result.getOrientation());
        assertNull(result.getSideOfRoad());
        assertTrue(result.getLocationLines().isEmpty());
        assertFalse(result.hasNegativeOffset());
        assertFalse(result.hasPositiveOffset());
        CommonObjectTestUtils.testToString(result);
    } catch (OpenLRProcessingException e) {
        fail("Unexpected exception!", e);
    }
}