### Question:
UserHibernateDao extends GenericDao<PoulpeUser> implements UserDao { @Override public List<PoulpeUser> getUsersInGroups(List<Group> groups) { Query query = session().getNamedQuery("findBannedUsers"); ArrayList groupsIds = new ArrayList(); for (Group group : groups) { groupsIds.add(new BigInteger(group.getId() + "")); } query.setParameterList("bannedGroups", groupsIds, StandardBasicTypes.BIG_INTEGER); return query.list(); } UserHibernateDao(SessionFactory sessionFactory); @Override List<PoulpeUser> findPoulpeUsersPaginated(String searchString, Pagination paginate); @Override List<PoulpeUser> findPoulpeUsersBySearchRequest(UserSearchRequest searchRequest); @Override int countUsernameMatches(String searchString); @Override PoulpeUser getByUsername(String username); @Override PoulpeUser getByEmail(String email); @Override PoulpeUser getByUUID(String uuid); @Override List<PoulpeUser> getUsersInGroups(List<Group> groups); @Override List<PoulpeUser> findUsersByUsernameAndPasswordHash(String username, String passwordHash); @Override List<PoulpeUser> findUsersNotInGroups(String availableFilterText,
                                                 List<Group> groups, Pagination paginate); @Override List<PoulpeUser> findUsersNotInList(String availableFilterText,
                                               List<PoulpeUser> listUsers, Pagination paginate); @Override void save(User user);  }### Answer:
@Test public void testGetAllUsersIncludesInGroups() { Group group = TestFixtures.groupWithUsers(); saveAndEvict(group); List<PoulpeUser> actual = dao.getUsersInGroups(Arrays.asList(group)); assertEquals(actual, group.getUsers()); }