### Question:
HibernateGroupDAO extends HibernatePersistentObjectDAO<Group> implements GroupDAO { @Override public Collection<String> findAllGroupNames(long tenantId) { Collection<String> coll = new ArrayList<String>(); try { Collection<Group> coll2 = findAll(); for (Group group : coll2) { if (group.getTenantId() == tenantId) coll.add(group.getName()); } } catch (Throwable e) { log.error(e.getMessage()); } return coll; } private  HibernateGroupDAO(); MenuDAO getMenuDAO(); void setMenuDAO(MenuDAO menuDAO); boolean delete(long groupId, int code); boolean exists(String groupname, long tenantId); @Override Collection<String> findAllGroupNames(long tenantId); @Override Group findByName(String name, long tenantId); @Override boolean insert(Group group, long parentGroupId); @Override void inheritACLs(Group group, long parentGroupId); @Override Collection<Group> findByLikeName(String name, long tenantId); @Override int count(); @Override void initialize(Group group); @Override boolean store(Group group); @Override void fixGuestPermissions(Group group);  }### Answer:
@Test public void testFindAllGroupNames() { Collection<String> groupNames = dao.findAllGroupNames(1); Assert.assertNotNull(groupNames); Assert.assertFalse(groupNames.isEmpty()); Assert.assertTrue(groupNames.contains("admin")); Assert.assertTrue(groupNames.contains("testGroup")); }