assertEquals(src, mappedSrc);
}
@Test
public void testMapToMap() throws Exception {
Mapper mapper = getMapper(new String[] { "mapInterfaceMapping.xml", "dozerBeanMapping.xml" });
TestObject to = newInstance(TestObject.class);
to.setOne("one");
TestObject to2 = newInstance(TestObject.class);
to2.setTwo(new Integer(2));
Map<String, TestObject> map = newInstance(HashMap.class);
map.put("to", to);
map.put("to2", to2);
Map<String, TestObject> map2 = newInstance(HashMap.class);
map2.put("to", to);
map2.put("to2", to2);
MapToMap mtm = new MapToMap(map, map2);
MapToMapPrime mtmp = mapper.map(mtm, MapToMapPrime.class);
assertEquals("one", ((TestObject) mtmp.getStandardMap().get("to")).getOne());
assertEquals(2, ((TestObject) mtmp.getStandardMap().get("to2")).getTwo().intValue());
// verify that we transformed from object to object prime
assertEquals("one", ((TestObjectPrime) mtmp.getStandardMapWithHint().get("to")).getOnePrime());
assertEquals(2, ((TestObjectPrime) mtmp.getStandardMapWithHint().get("to2")).getTwoPrime().intValue());