@Override
    public void doRun() {
        final Instant mustBeOlderThan = Instant.now().minus(maximumSearchAge);
        searchDbService.getExpiredSearches(findReferencedSearchIds(),
                mustBeOlderThan).forEach(searchDbService::delete);
    }
@Test
    public void testForEmptySearches() {
        final ViewSummaryDTO view = mock(ViewSummaryDTO.class);

        when(viewService.streamAll()).thenReturn(Stream.of(view));
        when(searchDbService.streamAll()).thenReturn(Stream.empty());

        this.searchesCleanUpJob.doRun();

        verify(searchDbService, never()).delete(any());
    }