### Question:
ProjectController { @PostMapping("/users/{userId}/projects") public Project insertProject(@RequestBody Project newProject, @PathVariable Integer userId) throws Exception { return projectService.createProject(newProject, userId); }  @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(3) public void insertProject() throws Exception { String url = "/users/2/projects"; Date date = new Date(System.currentTimeMillis()); Project newProject = new Project("springProject", false, date); String json = mapper.writeValueAsString(newProject); mvc.perform( MockMvcRequestBuilders.post(url) .content(json) .contentType(MediaType.APPLICATION_JSON) .accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(jsonPath("$.id").value(3)) .andExpect(jsonPath("$.title").value("springProject")) .andExpect(jsonPath("$.isDone").value("false")); }