### Question:
RequestController extends AbstractController { @GetMapping("/requests/{id}/actions") public ModelAndView detailActions(final Principal principal, @PathVariable final Long id) { final RequestDto request = requestService.findRequest(id); if (request != null) { final IssueInformationDto issueInformation = request.getIssueInformation(); return modelAndView().withObject("userClaimable", requestService.getUserClaimableResult(principal, id)) .withObject("request", request) .withObject("isAuthenticated", getAsJson(securityContextService.isUserFullyAuthenticated())) .withObject("platformIssue", platformIssueService.findBy(issueInformation.getPlatform(), issueInformation.getPlatformId()) .orElseThrow(ResourceNotFoundException::new)) .withView("pages/requests/detail-actions :: details") .build(); } else { throw new ResourceNotFoundException(); } } RequestController(final SecurityContextService securityContextService,
                             final RequestService requestService,
                             final PendingFundService pendingFundService,
                             final StatisticsService statisticsService,
                             final ProfileService profileService, FundService fundService,
                             final RefundService refundService,
                             final ClaimService claimService,
                             final FiatService fiatService,
                             final PlatformIssueService platformIssueService,
                             final ObjectMapper objectMapper,
                             final Mappers mappers); @GetMapping("/requests") ModelAndView requests(); @RequestMapping("/requests/{type}") ModelAndView details(@PathVariable String type, @RequestParam Map<String, String> queryParameters); @GetMapping("/requests/{id}") ModelAndView details(@PathVariable Long id, Model model); @GetMapping("/requests/github/{owner}/{repo}/{number}") ModelAndView details(@PathVariable String owner, @PathVariable String repo, @PathVariable String number, Model model); @GetMapping(value = "/requests/{id}/badge", produces = "image/svg+xml") ModelAndView detailsBadge(@PathVariable final Long id, final Model model, final HttpServletResponse response); @PostMapping("/requests/{id}/claim") ModelAndView claimRequest(Principal principal, @PathVariable Long id, @Valid UserClaimRequest userClaimRequest, RedirectAttributes redirectAttributes); @GetMapping("/requests/{id}/actions") ModelAndView detailActions(final Principal principal, @PathVariable final Long id); @PostMapping(value = {"/requests/{id}/watch"}, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody String toggleWatchRequest(Principal principal, @PathVariable Long id); @GetMapping("/user/requests") ModelAndView userRequests(Principal principal); @PostMapping(value = {"/rest/requests/erc67/fund"}, produces = MediaType.APPLICATION_JSON_UTF8_VALUE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseBody ERC67FundDto generateERC67ForFunding(@RequestBody @Valid CreateERC67FundRequest createERC67FundRequest);  }### Answer:
@Test public void detailActions() throws Exception { final RequestDto request = RequestDtoMother.freeCodeCampNoUserStories(); final IssueInformationDto issueInformation = request.getIssueInformation(); final UserClaimableDto userClaimableDto = mock(UserClaimableDto.class); final PlatformIssueDto platformIssue = mock(PlatformIssueDto.class); when(requestService.findRequest(1L)).thenReturn(request); when(requestService.getUserClaimableResult(principal, 1L)).thenReturn(userClaimableDto); when(platformIssueService.findBy(issueInformation.getPlatform(), issueInformation.getPlatformId())).thenReturn(Optional.of(platformIssue)); this.mockMvc.perform(get("/requests/{id}/actions", 1L).principal(principal)) .andExpect(MockMvcResultMatchers.status().isOk()) .andExpect(MockMvcResultMatchers.view().name("pages/requests/detail-actions :: details")) .andExpect(MockMvcResultMatchers.model().attribute("request", sameInstance(request))) .andExpect(MockMvcResultMatchers.model().attribute("userClaimable", sameInstance(userClaimableDto))) .andExpect(MockMvcResultMatchers.model().attribute("platformIssue", sameInstance(platformIssue))); }