@Test
public void testMapIdWithSubClasses() {
mapper = getMapper(new String[] { "inheritanceMapping4.xml" });
AContainer src = new AContainer();
src.setAProperty(getA());
BContainer dest = (BContainer) mapper.map(src, BContainer.class);
assertNotNull("B property of dest should be instantiated if mapping by map-id works", dest
.getBProperty());
// Remap to each other to test bi-directional mapping
AContainer mappedSrc = (AContainer) mapper.map(dest, AContainer.class);
BContainer mappedDest = (BContainer) mapper.map(mappedSrc, BContainer.class);
assertEquals("objects not mapped correctly bi-directional", dest, mappedDest);
}