### Question:
IssueController { @PutMapping("/users/{userId}/projects/{projectId}/pbis/{pbiId}/tasks/{taskId}/issues") public Issue updateIssue(@RequestBody Issue editedIssue, @PathVariable Integer taskId) throws Exception { return issueService.createOrEditIssue(editedIssue, taskId); }  @GetMapping("/issues") Iterable<Issue> getAllIssues(); @GetMapping("/users/{userId}/projects/{projectId}/pbis/{pbiId}/tasks/{taskId}/issues") List<Issue> getTaskIssues(@PathVariable Integer taskId); @PostMapping("/users/{userId}/projects/{projectId}/pbis/{pbiId}/tasks/{taskId}/issues") Issue insertIssue(@RequestBody Issue newIssue, @PathVariable Integer taskId); @PutMapping("/users/{userId}/projects/{projectId}/pbis/{pbiId}/tasks/{taskId}/issues") Issue updateIssue(@RequestBody Issue editedIssue, @PathVariable Integer taskId); @DeleteMapping( "/users/{userId}/projects/{projectId}/pbis/{pbiId}/tasks/{taskId}/issues/{issueId}") void deleteIssue(@PathVariable Integer issueId);  }### Answer:
@WithMockUser("spring") @Test @Order(3) public void updateIssue() throws Exception { String url = "/users/2/projects/2/pbis/2/tasks/1/issues"; Issue editIssue = new Issue("springIssue22"); editIssue.setId(2); String json = mapper.writeValueAsString(editIssue); mvc.perform( MockMvcRequestBuilders.put(url) .content(json) .contentType(MediaType.APPLICATION_JSON) .accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(jsonPath("$.id").value(2)) .andExpect(jsonPath("$.description").value("springIssue22")); }