assertEquals(2, StepExecutionCountingDecider.previousStepCount);
}
@Test
public void testDecisionRestart() throws Exception {
JobExecution execution = runJob("DecisionStepTests-restart-context", new Properties(), 10000L);
assertEquals(BatchStatus.STOPPED, execution.getBatchStatus());
List<StepExecution> stepExecutions = BatchRuntime.getJobOperator().getStepExecutions(execution.getExecutionId());
assertEquals(2, stepExecutions.size());
assertEquals("step1", stepExecutions.get(0).getStepName());
assertEquals("decision1", stepExecutions.get(1).getStepName());
JobExecution execution2 = restartJob(execution.getExecutionId(), new Properties(), 10000L);
assertEquals(BatchStatus.COMPLETED, execution2.getBatchStatus());
List<StepExecution> stepExecutions2 = BatchRuntime.getJobOperator().getStepExecutions(execution2.getExecutionId());
assertEquals(2, stepExecutions2.size());
assertEquals("decision1", stepExecutions2.get(0).getStepName());
assertEquals("step2", stepExecutions2.get(1).getStepName());
}