Iterator<StepExecutionInfoResource> iter = stepExecutions.iterator();
assertEquals(2, stepExecutions.size());
boolean step1MasterFound = false;
boolean step1MasterPartitionFound = false;
while (iter.hasNext()) {
StepExecutionInfoResource resource = iter.next();
assertEquals(BatchStatus.COMPLETED, resource.getStepExecution().getStatus());
assertEquals(ExitStatus.COMPLETED, resource.getStepExecution().getExitStatus());
if (resource.getStepExecution().getStepName().equals("step1-master")) {
step1MasterFound = true;
}
else if (resource.getStepExecution().getStepName().equals("step1-master:partition0")) {
step1MasterPartitionFound = true;
}
}
assertTrue("step1-master was not found in step execution list", step1MasterFound);
assertTrue("step1-master:partition0 was not found in step execution list", step1MasterPartitionFound);