### Question:
OpenHoursServiceImpl implements OpenHoursService { @Override public Set<OpeningHours> findAllByPlaceId(Long placeId) { return hoursRepo.findAllByPlaceId(placeId); }  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 findAllByPlaceIdTest() { Set<OpeningHours> genericOpeningHours = new HashSet<>(); genericOpeningHours.add(new OpeningHours()); genericOpeningHours.add(new OpeningHours()); when(openHoursRepo.findAllByPlaceId(anyLong())).thenReturn(genericOpeningHours); Set<OpeningHours> foundOpeningHours = openHoursService.findAllByPlaceId(anyLong()); assertEquals(foundOpeningHours, genericOpeningHours); Mockito.verify(openHoursRepo, times(1)).findAllByPlaceId(any()); }