### Question:
GroupHibernateDao extends GenericDao<Group> implements GroupDao { @Override @SuppressWarnings("unchecked") public List<Group> getAll() { return session().getNamedQuery("findAllGroups").list(); } GroupHibernateDao(SessionFactory sessionFactory); @Override @SuppressWarnings("unchecked") List<Group> getAll(); @SuppressWarnings("unchecked") @Override List<Group> getMatchedByName(String name); @Override Group getGroupByName(String name); @Override void delete(Group group); @Override List<Group> getGroupsOfUser(User user); @Override List<Group> getGroupsByIds(List<Long> ids); @SuppressWarnings("unchecked") @Override List<Group> getByNameContains(String name); @Override List<Group> getByName(String name); @SuppressWarnings("unchecked") @Override List<GroupAdministrationDto> getGroupNamesWithCountOfUsers(); @Override List<UserDto> getGroupUsersPage(long id, PageRequest pageRequest); @Override int getGroupUserCount(long id);  }### Answer:
@Test public void testGetAll() { Group group0 = ObjectsFactory.getRandomGroup(); saveAndEvict(group0); Group group1 = ObjectsFactory.getRandomGroup(); saveAndEvict(group1); List<Group> actual = groupDao.getAll(); sortById(actual); assertEquals(actual.size(), 2); assertReflectionEquals(actual.get(0), group0); assertReflectionEquals(actual.get(1), group1); }