public void testSkippable() throws Exception {
JobOperator jobOperator = BatchRuntime.getJobOperator();
Properties jobParameters = new Properties();
jobParameters.setProperty("run", "1");
JobExecution execution1 = runJob("ExceptionHandlingParsingTests-context", jobParameters, 10000l);
List<StepExecution> stepExecutions = jobOperator.getStepExecutions(execution1.getExecutionId());
assertEquals(BatchStatus.FAILED, execution1.getBatchStatus());
assertEquals(1, stepExecutions.size());
assertEquals(1, getMetric(stepExecutions.get(0), Metric.MetricType.PROCESS_SKIP_COUNT).getValue());
jobParameters = new Properties();
jobParameters.setProperty("run", "2");
JobExecution execution2 = restartJob(execution1.getExecutionId(), jobParameters, 10000l);
stepExecutions = jobOperator.getStepExecutions(execution2.getExecutionId());
assertEquals(BatchStatus.FAILED, execution2.getBatchStatus());
assertEquals(2, stepExecutions.size());
jobParameters = new Properties();
jobParameters.setProperty("run", "3");
JobExecution execution3 = restartJob(execution2.getExecutionId(), jobParameters, 10000l);
stepExecutions = jobOperator.getStepExecutions(execution3.getExecutionId());
assertEquals(BatchStatus.COMPLETED, execution3.getBatchStatus());
assertEquals(2, stepExecutions.size());
assertEquals(0, getMetric(stepExecutions.get(1), Metric.MetricType.ROLLBACK_COUNT).getValue());
jobParameters = new Properties();
jobParameters.setProperty("run", "4");
JobExecution execution4 = runJob("ExceptionHandlingParsingTests-context", jobParameters, 10000l);
stepExecutions = jobOperator.getStepExecutions(execution4.getExecutionId());
assertEquals(BatchStatus.COMPLETED, execution4.getBatchStatus());
assertEquals(3, stepExecutions.size());
}