}
@Test
public void testVoToMap_NoCustomMappings() throws Exception {
// Test simple Vo --> Map without any custom mappings defined.
SimpleObjPrime src = newInstance(SimpleObjPrime.class);
src.setField1("someValueField1");
src.setField2("someValueField2");
src.setSimpleobjprimefield("someOtherValue");
NestedObjPrime nested = newInstance(NestedObjPrime.class);
nested.setField1("field1Value");
nested.setField2("field2Value");
src.setNested(nested);
NestedObjPrime nested2 = newInstance(NestedObjPrime.class);
src.setNested2(nested2);
// Map complex object to HashMap
Map<?, ?> destMap = newInstance(HashMap.class);
mapper.map(src, destMap);
// Map HashMap back to new instance of the complex object
SimpleObjPrime mappedSrc = mapper.map(destMap, SimpleObjPrime.class);
// Remapped complex type should equal original src if all fields were mapped both ways.
assertEquals(src, mappedSrc);
}