### Question:
AuthController { @PostMapping public HttpEntity<Response> createDefaultUser(@RequestBody AuthDto authDto) { userService.createDefaultAuthUser(authDto); Response response = new Response(1, "SUCCESS", authDto); return new ResponseEntity<>(response, HttpStatus.CREATED); }  @GetMapping("/hello") String getHello(); @PostMapping HttpEntity<Response> createDefaultUser(@RequestBody AuthDto authDto);  }### Answer:
@Test public void testCreateDefaultUser() throws Exception { AuthDto authDto = new AuthDto(); Mockito.when(userService.createDefaultAuthUser(Mockito.any(AuthDto.class))).thenReturn(null); String requestJson = JSONObject.toJSONString(authDto); String result = mockMvc.perform(MockMvcRequestBuilders.post("/api/v1/auth").contentType(MediaType.APPLICATION_JSON).content(requestJson)) .andExpect(MockMvcResultMatchers.status().isCreated()) .andReturn().getResponse().getContentAsString(); Assert.assertEquals("SUCCESS", JSONObject.parseObject(result, Response.class).getMsg()); }