MappingProcessor implements Mapper { public <T> T map(final Object srcObj, final Class<T> destClass) { return map(srcObj, destClass, null); } protected  MappingProcessor(ClassMappings classMappings, Configuration globalConfiguration, CacheManager cacheMgr,
                               List<CustomConverter> customConverterObjects,
                               EventManager eventManager, CustomFieldMapper customFieldMapper,
                               Map<String, CustomConverter> customConverterObjectsWithId, BeanContainer beanContainer,
                               DestBeanCreator destBeanCreator, DestBeanBuilderCreator destBeanBuilderCreator,
                               BeanMappingGenerator beanMappingGenerator, PropertyDescriptorFactory propertyDescriptorFactory); T map(final Object srcObj, final Class<T> destClass); T map(final Object srcObj, final Class<T> destClass, final String mapId); void map(final Object srcObj, final Object destObj); void map(final Object srcObj, final Object destObj, final String mapId); @Override MapperModelContext getMapperModelContext();  }
@Test public void testTwiceObjectToObjectConvert() { DozerBeanMapper mapper = (DozerBeanMapper)DozerBeanMapperBuilder.buildDefault(); Mapper mappingProcessor = mapper.getMappingProcessor(); A src = new A(); src.setB(new B()); A dest1 = new A(); mappingProcessor.map(src, dest1); A dest2 = new A(); mappingProcessor.map(src, dest2); assertSame(dest1.getB(), dest2.getB()); }