@Override
    protected void runTask() {
        LOGGER.trace("Looking for succeeded jobs that can go to the deleted state... ");
        final Instant updatedBefore = now().minus(backgroundJobServerConfiguration().getDeleteSucceededJobsAfter());
        processManyJobs(previousResults -> getSucceededJobs(updatedBefore, previousResults),
                job -> job.delete("JobRunr maintenance - deleting succeeded job"),
                this::handleTotalAmountOfSucceededJobs);
    }
@Test
    void testTaskTakesIntoAccountConfiguration() {
        runTask(task);

        verify(storageProvider).getJobList(eq(SUCCEEDED), assertArg(x -> assertThat(x).isCloseTo(now().minus(Duration.ofDays(2)), within(5, SECONDS))), any());
    }