@Test(dependsOnMethods = {"testPOIWithAccesNoOffsets"})

public final void testResolvePhysicalDecoder() {
    final LocationReference mockedLocRef = mockery.mock(
            LocationReference.class, "locRefDummy");
    mockery.checking(new Expectations() {
        {
            allowing(mockedLocRef).getDataClass();
            will(returnValue(Object.class));
        }
    });
    mockery.checking(new Expectations() {
        {
            allowing(mockedLocRef).getDataIdentifier();
            will(returnValue(DummyPhysicalDecoderImpl.DATA_IDENTIFIER));
        }
    });
    mockery.checking(new Expectations() {
        {
            allowing(mockedLocRef).getLocationReferenceData();
            will(returnValue(null));
        }
    });
    mockery.checking(new Expectations() {
        {
            allowing(mockedLocRef).getID();
            will(returnValue(mockedLocRefPoiWithAccess.getID()));
        }
    });
    assertNotNull(mockedLocRefPoiWithAccess,
            "Required input object is null!");
    DummyPhysicalDecoderImpl.setRawLocToReturn(mockedLocRefPoiWithAccess);
    try {
        InputStream properties = new FileInputStream(DECODER_PROPERTIES);
        Configuration conf = OpenLRPropertiesReader
                .loadPropertiesFromStream(properties, true);
        OpenLRDecoder decoder = new OpenLRDecoder();
        // Test two possible methods, the one with the single object ...
        OpenLRDecoderParameter parameter = new OpenLRDecoderParameter.Builder()
                .with(mockedMapDB)
                .with(conf).buildParameter();
        Location decLocRef = decoder.decode(parameter, mockedLocRef);
        assertEquals(decLocRef.getID(), mockedLocRefPoiWithAccess.getID());
        // ... and the one with the list.
        properties = new FileInputStream(DECODER_PROPERTIES);
        List<Location> decLocRefs = decoder.decode(parameter,
                Arrays.asList(mockedLocRef));
        assertEquals(decLocRefs.get(0).getID(),
                mockedLocRefPoiWithAccess.getID());
    } catch (OpenLRProcessingException e) {
        fail("Decoding location failed with exception: " + e.getErrorCode(),
                e);
    } catch (IOException e) {
        fail("Error creating properties stream.", e);
    } finally {
        DummyPhysicalDecoderImpl.setRawLocToReturn(null);
    }
}