@Test
    public void testSubMarker() {
        mapper = super.getMapper("mappings/inheritanceMapping.xml");
        Main src = testDataFactory.getMain();

        // Map to Dto
        MainDto dest = mapper.map(src, MainDto.class);
        assertNotNull(dest);
        assertEquals(src.getName(), dest.getName());

        SubMarker subMarker = src.getSub();
        SubMarkerDto subMarkerDto = dest.getSub();
        assertNotNull(subMarkerDto);
        assertNull(subMarkerDto.getSub());
        assertEquals(subMarker.getMarker(), subMarkerDto.getMarker());
        assertEquals(subMarker.getName(), subMarkerDto.getName());

        Sub sub = (Sub)subMarker;
        SubDto subDto = (SubDto)subMarkerDto;
        assertEquals(sub.getDetail(), subDto.getDetail());

        // Map back
        src = mapper.map(dest, Main.class);
        assertNotNull(dest);
        assertEquals(dest.getName(), src.getName());

        subMarker = src.getSub();
        assertNotNull(subMarker);
        assertNull(subMarker.getSub());
        assertNull(subMarker.getMarker());//One way mapping
        assertEquals(subMarkerDto.getName(), subMarker.getName());

        sub = (Sub)subMarker;
        assertEquals(subDto.getDetail(), sub.getDetail());
    }
Bug #1828693 -- Problem when using with proxies based on interfaces.
core/src/test/java/com/github/dozermapper/core/functional_tests/InheritanceMappingTest.java