MapperFactory factory = MappingUtil.getMapperFactory();
factory.getConverterFactory().registerConverter(new LongToCalendarConverter());
MapperFacade mapper = factory.getMapperFacade();
long now = System.currentTimeMillis();
Calendar cal = mapper.map(now, Calendar.class);
Assert.assertEquals(now, cal.getTimeInMillis());
long reverse = mapper.map(cal, Long.class);
Assert.assertEquals(now, reverse);
}