UserService { public List<User> getUsersForCurrentDomain(int pagination) { User currentUSer = authenticationService.getCurrentUser(); String domain = DomainUtil.getDomainFromLogin(currentUSer.getLogin()); List<String> logins = domainRepository.getLoginsInDomain(domain, pagination); List<User> users = new ArrayList<User>(); for (String login : logins) { User user = getUserByLogin(login); users.add(user); } return users; }  User getUserByLogin(String login); String getLoginByRssUid(String rssUid); User getUserByUsername(String username); Collection<User> getUsersByLogin(Collection<String> logins); List<User> getUsersForCurrentDomain(int pagination); void updateUser(User user); void updatePassword(User user); void createUser(User user); void createTatamibot(String domain); void deleteUser(User user); @Secured("ROLE_ADMIN") @CacheEvict(value = {"group-user-cache", "group-cache","suggest-users-cache"}, allEntries = true) boolean desactivateUser( String username ); void registerUser(User user); void lostPassword(User user); String validateRegistration(String key); void updateWeeklyDigestRegistration(boolean registration); void updateDailyDigestRegistration(boolean registration); String updateRssTimelinePreferences(boolean booleanPreferencesRssTimeline); boolean isDomainHandledByLDAP(String domain); Collection<UserDTO> buildUserDTOList(Collection<User> users); UserDTO buildUserDTO(User user);  }
@Test public void testGetUsersForCurrentDomain() { mockAuthenticationOnUserService("jdubois@ippon.fr"); Collection<User> users = userService.getUsersForCurrentDomain(0); assertTrue(users.size() > 10); }