### Question:
SecurityController { @CrossOrigin(origins = "*") @PutMapping(path = "/securityConfigs") public HttpEntity update(@RequestBody SecurityConfig info, @RequestHeader HttpHeaders headers) { SecurityController.LOGGER.info("[Security Service][Update] Name: {}", info.getName()); return ok(securityService.modifySecurityConfig(info, headers)); }  @GetMapping(value = "/welcome") String home(@RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @GetMapping(path = "/securityConfigs") HttpEntity findAllSecurityConfig(@RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @PostMapping(path = "/securityConfigs") HttpEntity create(@RequestBody SecurityConfig info, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @PutMapping(path = "/securityConfigs") HttpEntity update(@RequestBody SecurityConfig info, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @DeleteMapping(path = "/securityConfigs/{id}") HttpEntity delete(@PathVariable String id, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @GetMapping(path = "/securityConfigs/{accountId}") HttpEntity check(@PathVariable String accountId, @RequestHeader HttpHeaders headers);  }### Answer:
@Test public void testUpdate() throws Exception { SecurityConfig info = new SecurityConfig(); Mockito.when(securityService.modifySecurityConfig(Mockito.any(SecurityConfig.class), Mockito.any(HttpHeaders.class))).thenReturn(response); String requestJson = JSONObject.toJSONString(info); String result = mockMvc.perform(MockMvcRequestBuilders.put("/api/v1/securityservice/securityConfigs").contentType(MediaType.APPLICATION_JSON).content(requestJson)) .andExpect(MockMvcResultMatchers.status().isOk()) .andReturn().getResponse().getContentAsString(); Assert.assertEquals(response, JSONObject.parseObject(result, Response.class)); }