HashSet<Base> set = new HashSet<Base>();
set.add(new BaseA());
set.add(new BaseB());
source.setSet(set);
Target result = mapper.map(source, Target.class);
assertNotNull(result);
assertNotNull(result.getSet());
assertEquals(2, result.getSet().size());
Object[] objects = result.getSet().toArray();
assertTrue(objects[0] instanceof Base2);
assertTrue(objects[1] instanceof Base2);
assertNotSame(objects[0].getClass(), objects[1].getClass());
}