### Question:
AdminUserController { @DeleteMapping(value = "/{userId}") public HttpEntity deleteUser(@PathVariable String userId, @RequestHeader HttpHeaders headers) { return ok(adminUserService.deleteUser(userId, headers)); }  @GetMapping(path = "/welcome") String home(@RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @GetMapping HttpEntity getAllUsers(@RequestHeader HttpHeaders headers); @PutMapping HttpEntity updateUser(@RequestBody UserDto userDto, @RequestHeader HttpHeaders headers); @PostMapping HttpEntity addUser(@RequestBody UserDto userDto, @RequestHeader HttpHeaders headers); @DeleteMapping(value = "/{userId}") HttpEntity deleteUser(@PathVariable String userId, @RequestHeader HttpHeaders headers);  }### Answer:
@Test public void testDeleteUser() throws Exception { Mockito.when(adminUserService.deleteUser(Mockito.anyString(), Mockito.any(HttpHeaders.class))).thenReturn(response); String result = mockMvc.perform(MockMvcRequestBuilders.delete("/api/v1/adminuserservice/users/user_id")) .andExpect(MockMvcResultMatchers.status().isOk()) .andReturn().getResponse().getContentAsString(); Assert.assertEquals(response, JSONObject.parseObject(result, Response.class)); }