@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);
}