### Question:
AdminBasicInfoController { @CrossOrigin(origins = "*") @DeleteMapping(path = "/adminbasic/configs/{name}") public HttpEntity deleteConfig(@PathVariable String name, @RequestHeader HttpHeaders headers) { AdminBasicInfoController.LOGGER.info("[Admin Basic Info Service][Delete Config by admin "); return ok(adminBasicInfoService.deleteConfig(name, headers)); }  @GetMapping(path = "/welcome") String home(@RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @GetMapping(path = "/adminbasic/contacts") HttpEntity getAllContacts(@RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @DeleteMapping(path = "/adminbasic/contacts/{contactsId}") HttpEntity deleteContacts(@PathVariable String contactsId, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @PutMapping(path = "/adminbasic/contacts") HttpEntity modifyContacts(@RequestBody Contacts mci, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @PostMapping(path = "/adminbasic/contacts") HttpEntity addContacts(@RequestBody Contacts c, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @GetMapping(path = "/adminbasic/stations") HttpEntity getAllStations(@RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @DeleteMapping(path = "/adminbasic/stations") HttpEntity deleteStation(@RequestBody Station s, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @PutMapping(path = "/adminbasic/stations") HttpEntity modifyStation(@RequestBody Station s, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @PostMapping(path = "/adminbasic/stations") HttpEntity addStation(@RequestBody Station s, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @GetMapping(path = "/adminbasic/trains") HttpEntity getAllTrains(@RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @DeleteMapping(path = "/adminbasic/trains/{id}") HttpEntity deleteTrain(@PathVariable String id, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @PutMapping(path = "/adminbasic/trains") HttpEntity modifyTrain(@RequestBody TrainType t, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @PostMapping(path = "/adminbasic/trains") HttpEntity addTrain(@RequestBody TrainType t, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @GetMapping(path = "/adminbasic/configs") HttpEntity getAllConfigs(@RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @DeleteMapping(path = "/adminbasic/configs/{name}") HttpEntity deleteConfig(@PathVariable String name, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @PutMapping(path = "/adminbasic/configs") HttpEntity modifyConfig(@RequestBody Config c, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @PostMapping(path = "/adminbasic/configs") HttpEntity addConfig(@RequestBody Config c, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @GetMapping(path = "/adminbasic/prices") HttpEntity getAllPrices(@RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @DeleteMapping(path = "/adminbasic/prices") HttpEntity deletePrice(@RequestBody PriceInfo pi, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @PutMapping(path = "/adminbasic/prices") HttpEntity modifyPrice(@RequestBody PriceInfo pi, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @PostMapping(path = "/adminbasic/prices") HttpEntity addPrice(@RequestBody PriceInfo pi, @RequestHeader HttpHeaders headers);  }### Answer:
@Test public void testDeleteConfig() throws Exception { Mockito.when(adminBasicInfoService.deleteConfig(Mockito.anyString(), Mockito.any(HttpHeaders.class))).thenReturn(response); String result = mockMvc.perform(MockMvcRequestBuilders.delete("/api/v1/adminbasicservice/adminbasic/configs/name")) .andExpect(MockMvcResultMatchers.status().isOk()) .andReturn().getResponse().getContentAsString(); Assert.assertEquals(response, JSONObject.parseObject(result, Response.class)); }