BBSController { @Secured("ROLE_USER") @GetMapping({"postpage", "post"}) public String postpage(Model model, @RequestParam(value = "problem_id", required = false) Long problemId) { model.addAttribute("problemId", problemId); return "bbs/postpage"; }  @GetMapping("bbs") String bbs(HttpServletRequest request,
            @RequestParam(value = "problem_id", required = false) Long problemId,
            @RequestParam(value = "size", defaultValue = "50") final int threadLimit,
            @RequestParam(value = "top", defaultValue = "99999999") final long top,
            Model model); @Secured("ROLE_USER") @GetMapping({"postpage", "post"}) String postpage(Model model,
            @RequestParam(value = "problem_id", required = false) Long problemId); @PostMapping("post") @Secured("ROLE_USER") @Transactional String post(@RequestParam(value = "problem_id", required = false) Long problemId,
            @RequestParam(value = "parent_id", required = false) Long parentId,
            @RequestParam(value = "content", defaultValue = "") String content,
            @RequestParam(value = "title", defaultValue = "") String title,
            RedirectAttributes redirectAttributes,
            Authentication authentication); @Secured("ROLE_USER") @GetMapping("showmessage") String showMessage(
            @RequestParam("message_id") long messageId,
            Model model);  }
@Test public void testPostpage() throws Exception { String userId = createUser(); testPostpage0(user(userId)) .andExpect(status().isOk()) .andExpect(view().name("bbs/postpage")) .andExpect(content().contentTypeCompatibleWith(MediaType.TEXT_HTML)) .andReturn(); }