factory.registerClassMap(ClassMapBuilder.map(OneOtherElement.class, OneOtherElementDTO.class).byDefault().toClassMap());
}
@Test
public void testHibernateProxyLike() {
MapperFactory factory = new DefaultMapperFactory.Builder().unenhanceStrategy(new UnenhanceStrategy() {
@SuppressWarnings("unchecked")
public <T> Type<T> unenhanceType(T object, Type<T> type) {
if (object instanceof PolicyElementProxy)
return (Type<T>) ((PolicyElementProxy) object).getTargetClass();
return type;