}
private static void performSomeMappings() {
List<String> mappingFiles = new ArrayList<String>();
mappingFiles.add("dozerBeanMapping.xml");
Mapper mapper = new DozerBeanMapper(mappingFiles);
try {
mapper.map(new String("yo"), new String("y"));
} catch (Throwable t) {
}
try {
mapper.map(null, null);
} catch (Throwable t) {
}
try {
mapper.map(new String(), null);
} catch (Throwable t) {
}
TestDataFactory testDataFactory = new TestDataFactory(NoProxyDataObjectInstantiator.INSTANCE);
TestObject to = testDataFactory.getInputGeneralMappingTestObject();
TestObjectPrime prime = mapper.map(to, TestObjectPrime.class);
TestObject source = mapper.map(prime, TestObject.class);
mapper.map(source, TestObjectPrime.class);
int numIters = 4000;
for (int i = 0; i < numIters; i++) {
SimpleObj src = testDataFactory.getSimpleObj();
mapper.map(src, SimpleObjPrime2.class);
}
mappingFiles = new ArrayList<String>();
mappingFiles.add("arrayToStringCustomConverter.xml");
mapper = new DozerBeanMapper(mappingFiles);
for (int i = 0; i < 6000; i++) {
SimpleObj simple = new SimpleObj();
simple.setField1(String.valueOf(System.currentTimeMillis()));
ArrayCustConverterObj src = new ArrayCustConverterObj();
src.setField1(new SimpleObj[] { simple });
mapper.map(src, ArrayCustConverterObjPrime.class);
}
}