ShowProblemController { @GetMapping("showproblem") public String showProblem(Model model, @RequestParam("problem_id") long problemId, @Nullable Locale locale) { Problem problem = getProblem(problemId, locale); model.addAttribute("problem", problem); model.addAttribute("isSpecial", systemService.isSpecialJudge(problemId)); String title1 = problemId + " -- " + problem.getTitle(); String title2 = problem.getTitle(); model.addAttribute("title1", title1); model.addAttribute("title2", title2); return "problems/view"; }  @GetMapping("showproblem") String showProblem(Model model, @RequestParam("problem_id") long problemId, @Nullable Locale locale);  }
@Test public void testShowProblem() throws Exception { log.info("showProblem"); long problemId = mockDataService.problem().getId(); Locale locale = Locale.getDefault(); MvcResult result = mvc.perform(get("/showproblem").param("problem_id", Long.toString(problemId)) .locale(locale)) .andExpect(status().isOk()) .andExpect(content().contentTypeCompatibleWith(MediaType.TEXT_HTML)) .andReturn(); }