### Question:
OpenHoursServiceImpl implements OpenHoursService { public List<OpeningHours> getOpenHoursByPlace(Place place) { return hoursRepo.findAllByPlace(place); }  List<OpeningHours> getOpenHoursByPlace(Place place); @Override OpeningHours save(OpeningHours hours); @Override List<OpeningHours> findAll(); @Override OpeningHours findById(Long id); @Override OpeningHours update(Long id, OpeningHours updatedHours); @Override Long deleteById(Long id); @Override Set<OpeningHours> findAllByPlaceId(Long placeId); @Override void deleteAllByPlaceId(Long placeId);  }### Answer:
@Test public void getOpenHoursByPlaceTest() { Place place = new Place(); List<OpeningHours> genericOpeningHours = Arrays.asList(new OpeningHours(), new OpeningHours()); when(openHoursRepo.findAllByPlace(any())).thenReturn(genericOpeningHours); List<OpeningHours> foundOpeningHours = openHoursService.getOpenHoursByPlace(place); assertEquals(genericOpeningHours, foundOpeningHours); Mockito.verify(openHoursRepo, times(1)).findAllByPlace(any()); }