@Test
public void cloneableConverter() throws DatatypeConfigurationException {
CloneableConverter cc = new CloneableConverter(SampleCloneable.class);
MapperFactory factory = MappingUtil.getMapperFactory();
factory.getConverterFactory().registerConverter(cc);
GregorianCalendar cal = new GregorianCalendar();
cal.add(Calendar.YEAR, 10);
XMLGregorianCalendar xmlCal = DatatypeFactory.newInstance().newXMLGregorianCalendar((GregorianCalendar)cal);
cal.add(Calendar.MONTH, 3);
ClonableHolder source = new ClonableHolder();
source.value = new SampleCloneable();
source.value.id = 5L;
source.date = new Date(System.currentTimeMillis() + 100000);
source.timestamp = new Timestamp(System.currentTimeMillis() + 50000);
source.calendar = cal;
source.xmlCalendar = xmlCal;
ClonableHolder dest = factory.getMapperFacade().map(source, ClonableHolder.class);
Assert.assertEquals(source.value, dest.value);
Assert.assertNotSame(source.value, dest.value);
Assert.assertEquals(source.date, dest.date);
Assert.assertNotSame(source.date, dest.date);
Assert.assertEquals(source.timestamp, dest.timestamp);