@Override
public void process(StepContribution contribution, Chunk<String> chunk) {
fail("Not expecting to get this far");
}
});
StepContribution contribution = new StepContribution(new StepExecution("foo", new JobExecution(new JobInstance(
123L, "job"), new JobParameters())));
try {
handler.execute(contribution, context);
fail("Expected RuntimeException");
}
catch (RuntimeException e) {
assertEquals("Foo!", e.getMessage());
}
assertEquals(0, contribution.getReadCount());
}