@Test
public void testMapJobInstances() {

    final int count = 5;
    final List<org.springframework.batch.core.JobInstance> jobInstances = new LinkedList<>();
    for (int i = 0; i < count; i++) {
        final org.springframework.batch.core.JobInstance jobInstance = DomainTestHelper.createJobInstance(1L, "testJob");
        jobInstances.add(jobInstance);
    }
    final List<JobInstance> result = BatchToResourceMapper.mapInstances(jobInstances);
    assertThat(result).hasSize(count);
}