### Question:
ExecuteControlller { @CrossOrigin(origins = "*") @GetMapping(path = "/execute/collected/{orderId}") public HttpEntity collectTicket(@PathVariable String orderId, @RequestHeader HttpHeaders headers) { ExecuteControlller.LOGGER.info("[Execute Service][Collect] Id: {}", orderId); return ok(executeService.ticketCollect(orderId, headers)); }  @GetMapping(path = "/welcome") String home(@RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @GetMapping(path = "/execute/execute/{orderId}") HttpEntity executeTicket(@PathVariable String orderId, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @GetMapping(path = "/execute/collected/{orderId}") HttpEntity collectTicket(@PathVariable String orderId, @RequestHeader HttpHeaders headers);  }### Answer:
@Test public void testCollectTicket() throws Exception { Mockito.when(executeService.ticketCollect(Mockito.anyString(), Mockito.any(HttpHeaders.class))).thenReturn(response); String result = mockMvc.perform(MockMvcRequestBuilders.get("/api/v1/executeservice/execute/collected/order_id")) .andExpect(MockMvcResultMatchers.status().isOk()) .andReturn().getResponse().getContentAsString(); Assert.assertEquals(response, JSONObject.parseObject(result, Response.class)); }