### Question:
UserServiceImpl implements UserService { @Override public long getNrOfUsers() { return userDao.count(); }  @Override Page<User> getAllUser(); @Override Page<User> getUser(int skip, int count, Order... order); @Override Page<User> getUser(Pageable page); @Override @Transactional(readOnly = false) User save(User user); @Override User read(Long userId); @Override @Transactional(readOnly = false) void delete(Long userId); @Override long getNrOfUsers(); @Override List<Post> getPostingSelectOptions();  }### Answer:
@SuppressWarnings("boxing") @Test public void testNrOfUsers() { final long nrOfUser = 10; when(userDao.count()).thenReturn(nrOfUser); long testValue = userService.getNrOfUsers(); verify(userDao, times(1)).count(); assertThat(testValue).isEqualTo(nrOfUser); }