UserServiceImpl implements UserService { @Override public List<Integer> getAllUserIdsInRange(int offset, int limit) { return _userDao.getAllUserIdsInRange(offset, limit); }  @Autowired void setUserDao(UserDao dao); @Autowired void setAuthoritiesService(
      StandardAuthoritiesService authoritiesService); @Autowired void setUserPropertiesService(
      UserPropertiesService userPropertiesService); @Autowired void setUserIndexRegistrationService(
      UserIndexRegistrationService userIndexRegistrationService); @Autowired void setPasswordEncoder(PasswordEncoder passwordEncoder); @PostConstruct void start(); @PreDestroy void stop(); @Override int getNumberOfUsers(); @Override List<Integer> getAllUserIds(); @Override List<Integer> getAllUserIdsInRange(int offset, int limit); @Override int getNumberOfAdmins(); @Override User getUserForId(int userId); @Override UserBean getUserAsBean(User user); @Override UserBean getAnonymousUser(); @Override void resetUser(User user); @Override void deleteUser(User user); @Override boolean isAnonymous(User user); @Override boolean isAdministrator(User user); @Override void enableAdminRoleForUser(User user, boolean onlyIfNoOtherAdmins); void disableAdminRoleForUser(User user, boolean onlyIfOtherAdmins); @Override List<String> getUserIndexKeyValuesForKeyType(String keyType); @Override Integer getApiKeyCount(); @Override List<User> getApiKeys(final int start, final int maxResults); @Override UserIndex getOrCreateUserForIndexKey(UserIndexKey key,
      String credentials, boolean isAnonymous); @Override UserIndex getOrCreateUserForUsernameAndPassword(String username,
      String password); @Override UserIndex getUserIndexForId(UserIndexKey key); @Override UserIndex getUserIndexForUsername(String username); @Override UserIndex addUserIndexToUser(User user, UserIndexKey key,
      String credentials); @Override void removeUserIndexForUser(User user, UserIndexKey key); @Override void setCredentialsForUserIndex(UserIndex userIndex, String credentials); @Override void setPasswordForUsernameUserIndex(UserIndex userIndex,
      String password); @Override void mergeUsers(User sourceUser, User targetUser); @Override String registerPhoneNumber(User user, String phoneNumber); @Override boolean hasPhoneNumberRegistration(UserIndexKey userIndexKey); @Override UserIndex completePhoneNumberRegistration(UserIndex userIndex,
      String registrationCode); @Override void clearPhoneNumberRegistration(UserIndexKey userIndexKey); @Override void startUserPropertiesMigration(); @Override UserPropertiesMigrationStatus getUserPropertiesMigrationStatus(); @Override void deleteStaleUsers(); @Override boolean isDeletingStaleUsers(); @Override void cancelDeleteStaleUsers(); @Override long getNumberOfStaleUsers(); @Cacheable @Transactional @Override Long getMinApiRequestIntervalForKey(String key,
      @CacheableArgument(cacheRefreshIndicator = true) boolean forceRefresh);  }
@Test public void getAllUserIdsForRange() { List<Integer> ids = Arrays.asList(1, 2, 3); Mockito.when(_userDao.getAllUserIdsInRange(0, 3)).thenReturn(ids); assertEquals(ids, _service.getAllUserIdsInRange(0, 3)); Mockito.verify(_userDao).getAllUserIdsInRange(0, 3); }