### Question:
AdminRouteController { @DeleteMapping(value = "/adminroute/{routeId}") public HttpEntity deleteRoute(@PathVariable String routeId, @RequestHeader HttpHeaders headers) { return ok(adminRouteService.deleteRoute(routeId, headers)); }  @GetMapping(path = "/welcome") String home(@RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @GetMapping(path = "/adminroute") HttpEntity getAllRoutes(@RequestHeader HttpHeaders headers); @PostMapping(value = "/adminroute") HttpEntity addRoute(@RequestBody RouteInfo request, @RequestHeader HttpHeaders headers); @DeleteMapping(value = "/adminroute/{routeId}") HttpEntity deleteRoute(@PathVariable String routeId, @RequestHeader HttpHeaders headers);  }### Answer:
@Test public void testDeleteRoute() throws Exception { Mockito.when(adminRouteService.deleteRoute(Mockito.anyString(),Mockito.any(HttpHeaders.class))).thenReturn(response); String result = mockMvc.perform(MockMvcRequestBuilders.delete("/api/v1/adminrouteservice/adminroute/routeId")) .andExpect(MockMvcResultMatchers.status().isOk()) .andReturn().getResponse().getContentAsString(); Assert.assertEquals(response, JSONObject.parseObject(result, Response.class)); }