// Tests that custom mappings for super classes are used when there are no custom mappings
// for subclasses. Also tests that a default class map is properly created and used for the subclass
// field mappings
mapper = getMapper(new String[] { "inheritanceMapping3.xml" });
A src = getA();
B dest = mapper.map(src, B.class);
assertNull("superField1 should have been excluded", dest.getSuperField1());
assertEquals("superBField not mapped correctly", src.getSuperAField(), dest.getSuperBField());
assertEquals("field1 not mapped correctly", src.getField1(), dest.getField1());
// Remap to each other to test bi-directional mapping
A mappedSrc = mapper.map(dest, A.class);
B mappedDest = mapper.map(mappedSrc, B.class);
assertEquals("objects not mapped correctly bi-directional", dest, mappedDest);
}