ShowSubmissionDetailsController { @GetMapping("showsolutiondetails") public String showSolutionDetails( HttpServletRequest request, @RequestParam("solution_id") long submissionId) { Submission submission = submissionService.findById(submissionId); Long contestId = submission.getContest(); if (contestId != null) { Contest contest = contestMapper.findOne(contestId); if (contest != null) { request.setAttribute("contestId", contest.getId()); } } if (!submissionService.canView(request, submission)) { throw new BusinessException(BusinessCode.VIEW_SOURCE_PERMISSION_DENIED, submissionId); } List<SubmissionDetailDTO> details = submissionService.getSubmissionDetail(submissionId); request.setAttribute("details", details); request.setAttribute("user", submission.getUser()); request.setAttribute("problem", submission.getProblem()); request.setAttribute("result", ResultType.getResultDescription(submission.getScore())); request.setAttribute("score", submission.getScore()); request.setAttribute("time", submission.getTime()); request.setAttribute("memory", submission.getMemory()); return "submissions/detail"; }  @GetMapping("showsolutiondetails") String showSolutionDetails(
            HttpServletRequest request,
            @RequestParam("solution_id") long submissionId);  }
@Test public void testShowSolutionDetails() throws Exception { log.info("showSolutionDetails"); Submission submission = mockDataService.submission(false); long solutionId = submission.getId(); MvcResult result = mvc.perform(get("/showsolutiondetails").with(user(submission.getUser())) .param("solution_id", Long.toString(solutionId))) .andExpect(status().isOk()) .andExpect(content().contentTypeCompatibleWith(MediaType.TEXT_HTML)) .andExpect(view().name("submissions/detail")) .andReturn(); }