### Question:
UserBanner { public void revokeBan(UserList usersToRevoke) { Group bannedUserGroup = getBannedUsersGroups().get(0); bannedUserGroup.getUsers().removeAll(usersToRevoke.getUsers()); groupDao.saveOrUpdate(bannedUserGroup); } UserBanner(GroupDao groupDao, UserDao userDao); List<PoulpeUser> getAllBannedUsers(); List<PoulpeUser> getNonBannedUsersByUsername(String availableFilterText, Pagination pagination); void banUsers(UserList usersToBan); void revokeBan(UserList usersToRevoke); List<Group> getBannedUsersGroups(); static final String BANNED_USERS_GROUP_NAME; }### Answer:
@Test(dataProvider = "provideGroupWithUsers") public void testRevokeBan(Group bannedUsersGroup) throws Exception { doReturn(Arrays.asList(bannedUsersGroup)).when(groupDao).getByName("Banned Users"); PoulpeUser userToRevokeBan = new PoulpeUser("a", "b", "c", "d"); sut.revokeBan(new UserList(Arrays.asList(userToRevokeBan))); bannedUsersGroup.getUsers().removeAll(Arrays.asList(userToRevokeBan)); assertTrue(!bannedUsersGroup.getUsers().contains(userToRevokeBan)); verify(groupDao).saveOrUpdate(bannedUsersGroup); }