### Question:
RouteController { @DeleteMapping(path = "/routes/{routeId}") public HttpEntity deleteRoute(@PathVariable String routeId, @RequestHeader HttpHeaders headers) { RouteController.LOGGER.info("Route id: {}", routeId); return ok(routeService.deleteRoute(routeId, headers)); }  @GetMapping(path = "/welcome") String home(); @PostMapping(path = "/routes") ResponseEntity<Response> createAndModifyRoute(@RequestBody RouteInfo createAndModifyRouteInfo, @RequestHeader HttpHeaders headers); @DeleteMapping(path = "/routes/{routeId}") HttpEntity deleteRoute(@PathVariable String routeId, @RequestHeader HttpHeaders headers); @GetMapping(path = "/routes/{routeId}") HttpEntity queryById(@PathVariable String routeId, @RequestHeader HttpHeaders headers); @GetMapping(path = "/routes") HttpEntity queryAll(@RequestHeader HttpHeaders headers); @GetMapping(path = "/routes/{startId}/{terminalId}") HttpEntity queryByStartAndTerminal(@PathVariable String startId,
                                              @PathVariable String terminalId,
                                              @RequestHeader HttpHeaders headers);  }### Answer:
@Test public void testDeleteRoute() throws Exception { Mockito.when(routeService.deleteRoute(Mockito.anyString(), Mockito.any(HttpHeaders.class))).thenReturn(response); String result = mockMvc.perform(MockMvcRequestBuilders.delete("/api/v1/routeservice/routes/route_id")) .andExpect(MockMvcResultMatchers.status().isOk()) .andReturn().getResponse().getContentAsString(); Assert.assertEquals(response, JSONObject.parseObject(result, Response.class)); }