### Question:
PhpbbRedirectionController { @RequestMapping("/forum{id}.php") public void showBranch(@PathVariable String id, HttpServletResponse response, WebRequest request) { String redirectUrl = request.getContextPath() + "/branches/" + id; setHttp301Headers(response, redirectUrl); }  @RequestMapping({"/ftopic{topicParams}", "/ftopic{topicParams}.php", "/ftopic{topicParams}/**", "/ftopic{topicParams}.php/**"}) void showFtopicWithAdditionalParams(@PathVariable String topicParams, HttpServletResponse response,
                                               WebRequest request); @RequestMapping("/topics/{topicParams}.php") void showTopicWithAdditionalParams(
            @PathVariable String topicParams,
            HttpServletResponse response,
            WebRequest request); @RequestMapping({"/sutra{id}.php", "/sutra{id}"}) void showPost(@PathVariable String id, HttpServletResponse response, WebRequest request); @RequestMapping("/forum{id}.php") void showBranch(@PathVariable String id, HttpServletResponse response, WebRequest request); @RequestMapping("/viewforum{branchParams}.php") void showBranchWithViewPrefix(@PathVariable String branchParams, HttpServletResponse response,
                                         WebRequest request); @RequestMapping("/search.php") void showSearch(HttpServletResponse response, WebRequest request);  }### Answer:
@Test public void testShowBranch() { controller.showBranch("1", response, request); this.assertHeadersSet(CONTEXT + "/branches/1"); }