mapper = getMapper("fieldCustomConverterParam.xml");
}
@Test
public void testSimpleCustomConverter() throws Exception {
SimpleObj src = newInstance(SimpleObj.class);
src.setField1(String.valueOf(System.currentTimeMillis()));
AnotherTestObject dest = mapper.map(src, AnotherTestObject.class);
// Custom converter specified for the field1 mapping, so verify custom converter was actually used
assertNotNull("dest field1 should not be null", dest.getField3());
StringTokenizer st = new StringTokenizer(dest.getField3(), "-");
assertEquals("dest field1 value should contain a hyphon", 2, st.countTokens());
String token1 = st.nextToken();
assertEquals("1st portion of dest field1 value should equal src field value", src.getField1(), token1);
String token2 = st.nextToken();
assertEquals("custom converter param should have been appended to by the cust converter", "CustomConverterParamTest", token2);
}