### Question:
ProjectController { @PutMapping("/users/{userId}/projects/{projectId}") public Project updateProject( @PathVariable Integer projectId, @RequestBody Project updatedProject) { updatedProject.setId(projectId); return projectRepository.save(updatedProject); }  @GetMapping("/projects") Iterable<Project> getAllProjects(); @GetMapping("/users/{userId}/numOfProjects") Integer getNumOfUserProjects(
            @PathVariable Integer userId, @RequestParam Boolean isDone); @GetMapping("/users/{userId}/projects") List<Project> getUserProjects(
            @PathVariable Integer userId,
            @RequestParam Boolean isDone,
            @RequestParam Integer recordsPerPage,
            @RequestParam Integer currentPage); @PostMapping("/users/{userId}/projects") Project insertProject(@RequestBody Project newProject, @PathVariable Integer userId); @GetMapping("/users/{userId}/projects/{projectId}") ProjectOverview getProjectOverview(
            @PathVariable Integer projectId, @RequestParam Optional<Integer> sprintId); @PutMapping("/users/{userId}/projects/{projectId}") Project updateProject(
            @PathVariable Integer projectId, @RequestBody Project updatedProject); @PutMapping("/users/{userId}/projects/{projectId}/changeIsDone") void archiveActivateProject(
            @PathVariable Integer projectId, @RequestBody Boolean isDoneToBecome); @DeleteMapping("/users/{userId}/projects/{projectId}") void deleteProject(@PathVariable Integer projectId); @GetMapping("/users/{userId}/projects/{projectId}/projectAuthorization") Boolean projectAuthorization(
            @PathVariable Integer userId, @PathVariable Integer projectId);  }### Answer:
@WithMockUser("spring") @Test @Order(5) public void updateProject() throws Exception { String url = "/users/1/projects/3"; Project editProject = this.repository.findById(3).get(); editProject.setTitle("springProject123"); String json = mapper.writeValueAsString(editProject); mvc.perform( MockMvcRequestBuilders.put(url) .content(json) .contentType(MediaType.APPLICATION_JSON) .accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(jsonPath("$.title").value("springProject123")) .andExpect(jsonPath("$.isDone").value("false")); }