@Test
    public void testCustomMappingForAsbstractDestClassCollection() {
        mapper = getMapper("mappings/abstractMapping.xml");
        AbstractACollectionContainer src = getAsContainer();
        AbstractBCollectionContainer dest = mapper.map(src, AbstractBCollectionContainer.class);
        assertTrue(dest.getBs().get(0) instanceof B);

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

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