### Question:
ConsignPriceController { @GetMapping(value = "/consignprice/config") public HttpEntity getPriceConfig(@RequestHeader HttpHeaders headers) { return ok(service.getPriceConfig(headers)); }  @GetMapping(path = "/welcome") String home(@RequestHeader HttpHeaders headers); @GetMapping(value = "/consignprice/{weight}/{isWithinRegion}") HttpEntity getPriceByWeightAndRegion(@PathVariable String weight, @PathVariable String isWithinRegion,
                                                @RequestHeader HttpHeaders headers); @GetMapping(value = "/consignprice/price") HttpEntity getPriceInfo(@RequestHeader HttpHeaders headers); @GetMapping(value = "/consignprice/config") HttpEntity getPriceConfig(@RequestHeader HttpHeaders headers); @PostMapping(value = "/consignprice") HttpEntity modifyPriceConfig(@RequestBody ConsignPrice priceConfig,
                                        @RequestHeader HttpHeaders headers);  }### Answer:
@Test public void testGetPriceConfig() throws Exception { Mockito.when(service.getPriceConfig(Mockito.any(HttpHeaders.class))).thenReturn(response); String result = mockMvc.perform(MockMvcRequestBuilders.get("/api/v1/consignpriceservice/consignprice/config")) .andExpect(MockMvcResultMatchers.status().isOk()) .andReturn().getResponse().getContentAsString(); Assert.assertEquals(response, JSONObject.parseObject(result, Response.class)); }