### Question:
AdminOrderController { @CrossOrigin(origins = "*") @GetMapping(path = "/adminorder") public HttpEntity getAllOrders(@RequestHeader HttpHeaders headers) { return ok(adminOrderService.getAllOrders(headers)); }  @GetMapping(path = "/welcome") String home(@RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @GetMapping(path = "/adminorder") HttpEntity getAllOrders(@RequestHeader HttpHeaders headers); @PostMapping(value = "/adminorder") HttpEntity addOrder(@RequestBody Order request, @RequestHeader HttpHeaders headers); @PutMapping(value = "/adminorder") HttpEntity updateOrder(@RequestBody Order request, @RequestHeader HttpHeaders headers); @DeleteMapping(value = "/adminorder/{orderId}/{trainNumber}") HttpEntity deleteOrder(@PathVariable String orderId, @PathVariable String trainNumber, @RequestHeader HttpHeaders headers);  }### Answer:
@Test public void testGetAllOrders() throws Exception { Mockito.when(adminOrderService.getAllOrders(Mockito.any(HttpHeaders.class))).thenReturn(response); String result = mockMvc.perform(MockMvcRequestBuilders.get("/api/v1/adminorderservice/adminorder")) .andExpect(MockMvcResultMatchers.status().isOk()) .andReturn().getResponse().getContentAsString(); Assert.assertEquals(response, JSONObject.parseObject(result, Response.class)); }