### Question:
FoodMapServiceImpl implements FoodMapService { @Override public Response listFoodStores(HttpHeaders headers) { List<FoodStore> foodStores = foodStoreRepository.findAll(); if (foodStores != null && !foodStores.isEmpty()) { return new Response<>(1, success, foodStores); } else { return new Response<>(0, "Foodstore is empty", null); } }  @Override Response createFoodStore(FoodStore fs, HttpHeaders headers); @Override TrainFood createTrainFood(TrainFood tf, HttpHeaders headers); @Override Response listFoodStores(HttpHeaders headers); @Override Response listTrainFood(HttpHeaders headers); @Override Response listFoodStoresByStationId(String stationId, HttpHeaders headers); @Override Response listTrainFoodByTripId(String tripId, HttpHeaders headers); @Override Response getFoodStoresByStationIds(List<String> stationIds);  }### Answer:
@Test public void testListFoodStores1() { List<FoodStore> foodStores = new ArrayList<>(); foodStores.add(new FoodStore()); Mockito.when(foodStoreRepository.findAll()).thenReturn(foodStores); Response result = foodMapServiceImpl.listFoodStores(headers); Assert.assertEquals(new Response<>(1, "Success", foodStores), result); }
@Test public void testListFoodStores2() { Mockito.when(foodStoreRepository.findAll()).thenReturn(null); Response result = foodMapServiceImpl.listFoodStores(headers); Assert.assertEquals(new Response<>(0, "Foodstore is empty", null), result); }