// User in SpecialUserGroup
User user = newInstance(User.class);
user.setUserGroup(userGroup);
// do mapping to UserPrime
UserPrime userPrime = mapper.map(user, UserPrime.class);
// check class type of mapped group, should be SpecialUserGroupPrime!
assertNotNull(userPrime.getUserGroup());
assertEquals("special user group", userPrime.getUserGroup().getName());
assertEquals(SpecialUserGroupPrime.class, userPrime.getUserGroup().getClass());
}