### Question:
TrainFoodController { @CrossOrigin(origins = "*") @GetMapping("/trainfoods") public HttpEntity getAllTrainFood(@RequestHeader HttpHeaders headers) { TrainFoodController.LOGGER.info("[Food Map Service][Get All TrainFoods]"); return ok(foodMapService.listTrainFood(headers)); }  @GetMapping(path = "/trainfoods/welcome") String home(); @CrossOrigin(origins = "*") @GetMapping("/trainfoods") HttpEntity getAllTrainFood(@RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @GetMapping("/trainfoods/{tripId}") HttpEntity getTrainFoodOfTrip(@PathVariable String tripId, @RequestHeader HttpHeaders headers);  }### Answer:
@Test public void testGetAllTrainFood() throws Exception { Mockito.when(foodMapService.listTrainFood(Mockito.any(HttpHeaders.class))).thenReturn(response); String result = mockMvc.perform(MockMvcRequestBuilders.get("/api/v1/foodmapservice/trainfoods")) .andExpect(MockMvcResultMatchers.status().isOk()) .andReturn().getResponse().getContentAsString(); Assert.assertEquals(response, JSONObject.parseObject(result, Response.class)); }