}
@Test
public void testInheritanceWithAbstractClassOrInterfaceAsDestination() throws Exception {
mapper = getMapper(new String[] { "dozerBeanMapping.xml" });
SpecificObject so = newInstance(SpecificObject.class);
so.setSuperAttr1("superAttr1");
// validate abstract class
Object obj = mapper.map(so, Specific3.class);
assertTrue(obj instanceof Specific3);
Specific3 spec3 = (Specific3) obj;
assertEquals("superAttr1", spec3.getSuperAttr3());
assertEquals("superAttr1", spec3.getSuperAttr2());
// validate interface
obj = mapper.map(so, Specific3.class);
assertTrue(obj instanceof Specific3);
spec3 = (Specific3) obj;
assertEquals("superAttr1", spec3.getSuperAttr3());
assertEquals("superAttr1", spec3.getSuperAttr2());
WrapperSpecific ws = newInstance(WrapperSpecific.class);
SpecificObject so2 = newInstance(SpecificObject.class);
so2.setSuperAttr1("superAttr1");
ws.setSpecificObject(so2);
WrapperSpecificPrime wsp = mapper.map(ws, WrapperSpecificPrime.class);
assertTrue(wsp.getSpecificObjectPrime() instanceof Specific3);
assertEquals("superAttr1", ((Specific3) wsp.getSpecificObjectPrime()).getSuperAttr3());
assertEquals("superAttr1", ((Specific3) wsp.getSpecificObjectPrime()).getSuperAttr2());