### Question:
GroupHibernateDao extends GenericDao<Group> implements GroupDao { @Override public void delete(Group group) { session().update(group); group.getUsers().clear(); saveOrUpdate(group); super.delete(group); } 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 testDeleteGroup() { Group group = ObjectsFactory.getRandomGroup(); saveAndEvict(group); groupDao.delete(group); Group actual = groupDao.get(group.getId()); assertNull(actual); }