@Test
public void testCustomMappingForAbstractDestClassLevelTwo() throws Exception {
mapper = getMapper("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);
}