public void run(TaskRunInfo runInfo) {
        try {
            this.runInfo = runInfo;
            if (pollIntervalInSecondsTimeBoxIsAboutToPass()) return;
            long startTime = System.nanoTime();
            runTask();
            long endTime = System.nanoTime();
            LOGGER.trace("task took {}.", Duration.ofNanos((endTime - startTime)));
        } finally {
            this.runInfo = null;
        }
    }
@Test
    void tasksArePostponedToNextRunIfPollIntervalInSecondsTimeboxIsAboutToPass() {
        reset(storageProvider);

        PeriodicTaskRunInfo periodicTaskRunInfo = zooKeeperStatistics.startRun(backgroundJobServer.getConfiguration());
        setRunStartTimeInPast(periodicTaskRunInfo, 15);

        task.run(periodicTaskRunInfo);

        verifyNoInteractions(storageProvider);
    }