BatchToResourceMapper { public static List<JobExecution> mapExecutions(final Collection<org.springframework.batch.core.JobExecution> jobExecutions) { final List<JobExecution> response = new LinkedList<>(); for (final org.springframework.batch.core.JobExecution jobExecution : jobExecutions) { response.add(map(jobExecution)); } return response; } private  BatchToResourceMapper(); static List<JobExecution> mapExecutions(final Collection<org.springframework.batch.core.JobExecution>
                                                           jobExecutions); static JobExecution map(final org.springframework.batch.core.JobExecution jobExecution); static List<JobInstance> mapInstances(final Collection<org.springframework.batch.core.JobInstance>
                                                         jobInstances); static JobInstance map(final org.springframework.batch.core.JobInstance jobInstance); static JobParameters map(final org.springframework.batch.core.JobParameters jobParameters); static StepExecution map(final org.springframework.batch.core.StepExecution stepExecution); static ExitStatus map(final org.springframework.batch.core.ExitStatus exitStatus); static BatchStatus map(final org.springframework.batch.core.BatchStatus batchStatus); static ParameterType map(final org.springframework.batch.core.JobParameter.ParameterType parameterType);  }
@Test public void testMapExecutions() { final int count = 5; final Collection<org.springframework.batch.core.JobExecution> jobExecutions = new LinkedList<>(); for (int i = 0; i < count; i++) { final org.springframework.batch.core.JobExecution jobExecution = DomainTestHelper.createJobExecution((long) i); final org.springframework.batch.core.JobInstance jobInstance = DomainTestHelper.createJobInstance((long) 1, "test"); jobExecution.setJobInstance(jobInstance); jobExecutions.add(jobExecution); } final Collection<JobExecution> result = BatchToResourceMapper.mapExecutions(jobExecutions); assertThat(result).hasSize(count); }