### Question:
FoodMapServiceImpl implements FoodMapService { @Override public Response createFoodStore(FoodStore fs, HttpHeaders headers) { FoodStore fsTemp = foodStoreRepository.findById(fs.getId()); if (fsTemp != null) { FoodMapServiceImpl.LOGGER.info("[Food Map Service][Init FoodStore] Already Exists Id: {}", fs.getId()); return new Response<>(0, "Already Exists Id", null); } else { foodStoreRepository.save(fs); return new Response<>(1, "Save Success", fs); } }  @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 testCreateFoodStore1() { FoodStore fs = new FoodStore(); Mockito.when(foodStoreRepository.findById(Mockito.any(UUID.class))).thenReturn(fs); Response result = foodMapServiceImpl.createFoodStore(fs, headers); Assert.assertEquals(new Response<>(0, "Already Exists Id", null), result); }
@Test public void testCreateFoodStore2() { FoodStore fs = new FoodStore(); Mockito.when(foodStoreRepository.findById(Mockito.any(UUID.class))).thenReturn(null); Mockito.when(foodStoreRepository.save(Mockito.any(FoodStore.class))).thenReturn(null); Response result = foodMapServiceImpl.createFoodStore(fs, headers); Assert.assertEquals(new Response<>(1, "Save Success", fs), result); }