### Question:
ReadPostsController { @RequestMapping(value = "/recent/forum/markread", method = RequestMethod.GET) public String markAllForumAsReadFromRecentActivity() { retryTemplate.execute(new RetryCallback<Void, RuntimeException>() { @Override public Void doWithRetry(RetryContext context) throws HibernateOptimisticLockingFailureException { lastReadPostService.markAllForumAsReadForCurrentUser(); return null; } }); return "redirect:/topics/recent"; } @Autowired  ReadPostsController(BranchService branchService, LastReadPostService lastReadPostService,
                               RetryTemplate retryTemplate, TopicFetchService topicService); @RequestMapping(value = "/recent/forum/markread", method = RequestMethod.GET) String markAllForumAsReadFromRecentActivity(); @RequestMapping(value = "/main/forum/markread", method = RequestMethod.GET) String markAllForumAsReadFromMainPage(); @RequestMapping("/branches/{id}/markread") String markAllTopicsAsRead(@PathVariable long id); @ResponseBody @RequestMapping("/topics/{topicId}/page/{pageNum}/markread") String markTopicPageAsReadById(@PathVariable long topicId,
                                          @PathVariable int pageNum);  }### Answer:
@Test public void markAllForumAsReadFromRecentActivityShouldRedirectToRecentActivityPage() { String redirectUrl = controller.markAllForumAsReadFromRecentActivity(); assertEquals(redirectUrl, "redirect:/topics/recent"); verify(lastReadPostService).markAllForumAsReadForCurrentUser(); }