### Question:
UserManagerServiceImpl extends HibernateDaoImpl implements UserManagerService { @Transactional(propagation = Propagation.REQUIRED, readOnly = false) public void deleteAll(ExecutionContext context, List<String> users) { if (users != null) { for(String userName : users) { if (userName != null && userName.length() > 0) { userService.deleteUser(context, userName); } } } }  @Transactional(propagation = Propagation.REQUIRED, readOnly = false) void updateUser(ExecutionContext context, String userName, User userDetails,
                                 Set<Role> assignedRoleSet, Set<Role> unassignedRoleSet); @Transactional(propagation = Propagation.REQUIRED, readOnly = false) void enableAll(ExecutionContext context, List<String> users); @Transactional(propagation = Propagation.REQUIRED, readOnly = false) void disableAll(ExecutionContext context, List<String> users); @Transactional(propagation = Propagation.REQUIRED, readOnly = false) void deleteAll(ExecutionContext context, List<String> users); void setUserService(UserAuthorityService userService);  }### Answer:
@Test public void deleteAll() { List<String> users = new ArrayList<String>(); users.add(demo); users.add(first); users.add(second); managerService.deleteAll(null, users); verify(userService, times(1)).deleteUser(null, demo); verify(userService, times(1)).deleteUser(null, first); verify(userService, times(1)).deleteUser(null, second); }
@Test public void deleteAllIfNull() { managerService.deleteAll(null, null); }
@Test public void deleteAllIfEmptyList() { managerService.deleteAll(null, new ArrayList<String>()); }
@Test public void deleteAllIfListWithNullAndEmptyValue() { List<String> users = new ArrayList<String>(); users.add(null); users.add(""); managerService.deleteAll(null, users); }