### Question:
UserServiceImpl implements UserService { @Override public User read(Long userId) { final User user = userDao.findOne(userId); if (user != null && !CollectionUtils.isEmpty(user.getPostings())) { user.getPostings().size(); } return user; }  @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:
@Test public void testRead() { when(userDao.findOne(Long.valueOf(1L))).thenReturn(new User()); userService.read(Long.valueOf(1L)); verify(userDao, times(1)).findOne(Long.valueOf(1L)); }