public void rollbackVersions(List<Job> jobsThatFailed) {
        Set<UUID> jobIdsThatFailed = jobsThatFailed.stream().map(Job::getId).collect(toSet());
        this.jobVersioners.stream()
                .filter(jobVersioner -> !jobIdsThatFailed.contains(jobVersioner.getJob().getId()))
                .forEach(JobVersioner::commitVersion);
    }
@Test
    void testJobListVersionerInTryWithResourcesOnRollbackOfSomeJobsVersionIsDecreasedForThoseJobs() {
        // GIVEN
        Job job1 = aScheduledJob().withVersion(5).build();
        Job job2 = aScheduledJob().withVersion(5).build();

        // WHEN
        try (JobListVersioner jobListVersioner = new JobListVersioner(asList(job1, job2))) {
            jobListVersioner.rollbackVersions(asList(job2));
        }

        // THEN
        assertThat(job1).hasVersion(6);
        assertThat(job2).hasVersion(5);
    }