### Question:
PostServiceImpl implements PostService { @Override @Transactional(readOnly = false) public void delete(Long postId) { final Post oldPost = postDao.findOne(postId); oldPost.setTags(null); postDao.delete(oldPost); }  @Override Page<Post> getPost(Pageable page); @Override @Transactional(readOnly = false) Post save(Post post); @Override Post read(Long postId); @Override @Transactional(readOnly = false) void delete(Long postId); @Override long getNrOfPosts(); @Override List<User> getAllUsers(); @Override List<Tag> getAllActiveTags();  }### Answer:
@Test public void testDelete() { Post post = new Post(); when(postDao.findOne(Long.valueOf(1))).thenReturn(post); postService.delete(Long.valueOf(1L)); verify(postDao, times(1)).delete(post); }