public class PrimitivesTestCase {
@Test
public void testPrimitivesToWrapper() {
MapperFactory factory = MappingUtil.getMapperFactory();
MapperFacade mapper = factory.getMapperFacade();
PrimitiveAttributes source = new PrimitiveAttributes();
source.setAge(27);
source.setShortValue((short)27);
source.setFloatValue(2.5f);
source.setDoubleValue(22.4567d);
source.setLongValue(System.currentTimeMillis());
source.setName("PPPPP");
source.setSex('H');
source.setVip(true);
WrapperAttributes destination = mapper.map(source, WrapperAttributes.class);
Assert.assertEquals(Integer.valueOf(source.getAge()), destination.getAge());
Assert.assertEquals(source.getName(), destination.getName());
Assert.assertEquals(Character.valueOf(source.getSex()), destination.getSex());
Assert.assertEquals(source.getVip(), destination.getVip());