### Question:
FoodStoreController { @CrossOrigin(origins = "*") @PostMapping("/foodstores") public HttpEntity getFoodStoresByStationIds(@RequestBody List<String> stationIdList) { return ok(foodMapService.getFoodStoresByStationIds(stationIdList)); }  @GetMapping(path = "/foodstores/welcome") String home(); @CrossOrigin(origins = "*") @GetMapping("/foodstores") HttpEntity getAllFoodStores(@RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @GetMapping("/foodstores/{stationId}") HttpEntity getFoodStoresOfStation(@PathVariable String stationId, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @PostMapping("/foodstores") HttpEntity getFoodStoresByStationIds(@RequestBody List<String> stationIdList);  }### Answer:
@Test public void testGetFoodStoresByStationIds() throws Exception { List<String> stationIdList = new ArrayList<>(); Mockito.when(foodMapService.getFoodStoresByStationIds(Mockito.anyList())).thenReturn(response); String requestJson = JSONObject.toJSONString(stationIdList); String result = mockMvc.perform(MockMvcRequestBuilders.post("/api/v1/foodmapservice/foodstores").contentType(MediaType.APPLICATION_JSON).content(requestJson)) .andExpect(MockMvcResultMatchers.status().isOk()) .andReturn().getResponse().getContentAsString(); Assert.assertEquals(response, JSONObject.parseObject(result, Response.class)); }