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);