private void stubServiceToReturnExistingUsers(int howMany) { when(userService.getAll()).thenReturn(UserUtil.createUserList(howMany)); }
private User stubServiceToReturnStoredUser() { final User user = UserUtil.createUser(); when(userService.create(any(User.class))).thenReturn(user); return user; }