### Question:
TravelPlanController { @PostMapping(value="/travelPlan/quickest") public HttpEntity getByQuickest(@RequestBody TripInfo queryInfo, @RequestHeader HttpHeaders headers) { TravelPlanController.LOGGER.info("[Search Quickest]"); return ok(travelPlanService.getQuickest(queryInfo, headers)); }  @GetMapping(path = "/welcome" ) String home(); @PostMapping(value="/travelPlan/transferResult" ) HttpEntity getTransferResult(@RequestBody TransferTravelInfo info, @RequestHeader HttpHeaders headers); @PostMapping(value="/travelPlan/cheapest") HttpEntity getByCheapest(@RequestBody TripInfo queryInfo, @RequestHeader HttpHeaders headers); @PostMapping(value="/travelPlan/quickest") HttpEntity getByQuickest(@RequestBody TripInfo queryInfo, @RequestHeader HttpHeaders headers); @PostMapping(value="/travelPlan/minStation") HttpEntity getByMinStation(@RequestBody TripInfo queryInfo, @RequestHeader HttpHeaders headers);  }### Answer:
@Test public void testGetByQuickest() throws Exception { TripInfo queryInfo = new TripInfo(); Mockito.when(travelPlanService.getQuickest(Mockito.any(TripInfo.class), Mockito.any(HttpHeaders.class))).thenReturn(response); String requestJson = JSONObject.toJSONString(queryInfo); String result = mockMvc.perform(MockMvcRequestBuilders.post("/api/v1/travelplanservice/travelPlan/quickest").contentType(MediaType.APPLICATION_JSON).content(requestJson)) .andExpect(MockMvcResultMatchers.status().isOk()) .andReturn().getResponse().getContentAsString(); Assert.assertEquals(response, JSONObject.parseObject(result, Response.class)); }