}
private void runMapGetSetMethodTest(String mapId) throws Exception {
// Test that custom field converter works for Custom Map Types
mapper = getMapper(new String[] { "mapGetSetMethodMapping.xml" });
CustomMap src = newInstance(CustomMap.class);
src.putValue("fieldA", "someStringValue");
src.putValue("field2", "someOtherStringValue");
src.putValue("fieldC", "1");
src.putValue("fieldD", "2");
src.putValue("fieldE", "10-15-2005");
SimpleObj dest = mapper.map(src, SimpleObj.class, mapId);
assertEquals("wrong value for field1", src.getValue("fieldA"), dest.getField1());
assertEquals("wrong value for field2", src.getValue("field2"), dest.getField2());
assertEquals("wrong value for field3", Integer.valueOf("1"), dest.getField3());
assertEquals("wrong value for field4", Integer.valueOf("2"), dest.getField4());
Calendar expected = Calendar.getInstance();
expected.set(2005, 10, 15);
assertEquals(expected.get(Calendar.YEAR), dest.getField5().get(Calendar.YEAR));
assertEquals(Calendar.OCTOBER, dest.getField5().get(Calendar.MONTH));
assertEquals(expected.get(Calendar.DATE), dest.getField5().get(Calendar.DATE));
// Remap to test bi-directional mapping
CustomMap remappedSrc = mapper.map(dest, CustomMap.class, mapId);
assertTrue("remapped src should equal original src", EqualsBuilder.reflectionEquals(src.getMap(), remappedSrc.getMap()));
}