### Question:
PriceController { @DeleteMapping(value = "/prices") public HttpEntity delete(@RequestBody PriceConfig info, @RequestHeader HttpHeaders headers) { return ok(service.deletePriceConfig(info, headers)); }  @GetMapping(path = "/prices/welcome") String home(); @GetMapping(value = "/prices/{routeId}/{trainType}") HttpEntity query(@PathVariable String routeId, @PathVariable String trainType,
                            @RequestHeader HttpHeaders headers); @GetMapping(value = "/prices") HttpEntity queryAll(@RequestHeader HttpHeaders headers); @PostMapping(value = "/prices") HttpEntity<?> create(@RequestBody PriceConfig info,
                                @RequestHeader HttpHeaders headers); @DeleteMapping(value = "/prices") HttpEntity delete(@RequestBody PriceConfig info, @RequestHeader HttpHeaders headers); @PutMapping(value = "/prices") HttpEntity update(@RequestBody PriceConfig info, @RequestHeader HttpHeaders headers);  }### Answer:
@Test public void testDelete() throws Exception { PriceConfig info = new PriceConfig(); Mockito.when(service.deletePriceConfig(Mockito.any(PriceConfig.class), Mockito.any(HttpHeaders.class))).thenReturn(response); String requestJson = JSONObject.toJSONString(info); String result = mockMvc.perform(MockMvcRequestBuilders.delete("/api/v1/priceservice/prices").contentType(MediaType.APPLICATION_JSON).content(requestJson)) .andExpect(MockMvcResultMatchers.status().isOk()) .andReturn().getResponse().getContentAsString(); Assert.assertEquals(response, JSONObject.parseObject(result, Response.class)); }