### Question:
UserController { @DeleteMapping("/{userId}") public ResponseEntity<Response> deleteUserById(@PathVariable String userId, @RequestHeader HttpHeaders headers) { return ResponseEntity.ok(userService.deleteByUserId(UUID.fromString(userId), headers)); }  @GetMapping("/hello") Object getHello(); @PostMapping("/login") ResponseEntity<Response> getToken(@RequestBody BasicAuthDto dao , @RequestHeader HttpHeaders headers); @GetMapping ResponseEntity<List<User>> getAllUser(@RequestHeader HttpHeaders headers); @DeleteMapping("/{userId}") ResponseEntity<Response> deleteUserById(@PathVariable String userId, @RequestHeader HttpHeaders headers);  }### Answer:
@Test public void testDeleteUserById() throws Exception { UUID userId = UUID.randomUUID(); Mockito.when(userService.deleteByUserId(Mockito.any(UUID.class), Mockito.any(HttpHeaders.class))).thenReturn(response); String result = mockMvc.perform(MockMvcRequestBuilders.delete("/api/v1/users/" + userId.toString())) .andExpect(MockMvcResultMatchers.status().isOk()) .andReturn().getResponse().getContentAsString(); Assert.assertEquals(response, JSONObject.parseObject(result, Response.class)); }