@Test
    public void testCustomMappingForAbstractDestClassLevelTwo() {
        mapper = getMapper("mappings/abstractMapping.xml");
        AbstractAContainer src = getAWrapper();
        AbstractBContainer dest = mapper.map(src, AbstractBContainer.class);
        assertTrue(dest.getB() instanceof B);

        assertNull("abstractField1 should have been excluded", dest.getB().getAbstractField1());
        assertEquals("abstractBField not mapped correctly", src.getA().getAbstractAField(), dest.getB().getAbstractBField());
        assertEquals("field1 not mapped correctly", ((A)src.getA()).getField1(), ((B)dest.getB()).getField1());
        assertEquals("fieldB not mapped correctly", ((A)src.getA()).getFieldA(), ((B)dest.getB()).getFieldB());

        // Remap to each other to test bi-directional mapping
        AbstractAContainer mappedSrc = mapper.map(dest, AbstractAContainer.class);
        AbstractBContainer mappedDest = mapper.map(mappedSrc, AbstractBContainer.class);

        assertEquals("objects not mapped correctly bi-directional", dest, mappedDest);
    }
Unit tests for data objects that have Abstract Class(s) in their object hierarchy
core/src/test/java/com/github/dozermapper/core/functional_tests/InheritanceAbstractClassMappingTest.java