public JobStatsExtended enrich(JobStats jobStats) {
        JobStats latestJobStats = getLatestJobStats(jobStats, previousJobStats);
        if (lock.tryLock()) {
            setFirstRelevantJobStats(latestJobStats);
            setJobStatsExtended(latestJobStats);
            setPreviousJobStats(latestJobStats);
            lock.unlock();
        }
        return jobStatsExtended;
    }
@Test
    void estimatedTimeProcessingIsCalculated5() {
        JobStats firstJobStats = getJobStats(now().minusSeconds(3610), 10L, 0L, 0L, 100L);
        JobStats secondJobStats = getJobStats(now().minusSeconds(3600), 5L, 4L, 0L, 101L);
        JobStats thirdJobStats = getJobStats(now(), 4L, 4L, 0L, 102L);

        JobStatsExtended jobStatsExtended = enrich(firstJobStats, secondJobStats, thirdJobStats);

        assertThat(jobStatsExtended.getEstimation().isProcessingDone()).isFalse();
        assertThat(jobStatsExtended.getEstimation().isEstimatedProcessingFinishedInstantAvailable()).isTrue();
        assertThat(Duration.between(now(), jobStatsExtended.getEstimation().getEstimatedProcessingFinishedAt()).toSeconds()).isCloseTo(80L, Offset.offset(2L));
    }