@Test
    public void testCustomMappingForAbstractDestClass() {
        mapper = getMapper("mappings/abstractMapping.xml");
        A src = getA();
        AbstractB dest = mapper.map(src, AbstractB.class);

        assertTrue(dest instanceof B);

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

        // Remap to each other to test bi-directional mapping
        AbstractA mappedSrc = mapper.map(dest, AbstractA.class);
        AbstractB mappedDest = mapper.map(mappedSrc, AbstractB.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