### Question:
TransactionalLastReadPostService implements LastReadPostService, PluginLastReadPostService { @Override public void markAllForumAsReadForCurrentUser() { JCUser currentUser = userService.getCurrentUser(); currentUser.setAllForumMarkedAsReadTime(new DateTime()); userDao.saveOrUpdate(currentUser); lastReadPostDao.deleteLastReadPostsFor(currentUser); } TransactionalLastReadPostService(
            UserService userService,
            LastReadPostDao lastReadPostDao,
            UserDao userDao,
            BranchReadedMarkerDao branchReadedMarkerDao); @Override List<Topic> fillLastReadPostForTopics(List<Topic> topics); @Override @PreAuthorize("hasPermission(#topic.branch.id, 'BRANCH', 'BranchPermission.VIEW_TOPICS')") void markTopicPageAsRead(Topic topic, int pageNum); @Override @PreAuthorize("hasPermission(#topic.branch.id, 'BRANCH', 'BranchPermission.VIEW_TOPICS')") void markTopicAsRead(Topic topic); @Override @PreAuthorize("hasPermission(#branch.id, 'BRANCH', 'BranchPermission.VIEW_TOPICS')") void markAllTopicsAsRead(Branch branch); @Override void markAllForumAsReadForCurrentUser();  }### Answer:
@Test public void markAllForumAsReadShouldRememberMarkDateAndClearLastReadPostsForUser() { JCUser user = new JCUser("user", "use@gmail.com", "gangam-style-password"); when(userService.getCurrentUser()).thenReturn(user); lastReadPostService.markAllForumAsReadForCurrentUser(); assertNotNull(user.getAllForumMarkedAsReadTime(), "Mark date should be remembered for user."); verify(userDao).saveOrUpdate(user); verify(lastReadPostDao).deleteLastReadPostsFor(user); }