@Test
public void testExceptionHandler() throws Exception {
SimpleStepFactoryBean<String, String> factory = getStepFactory(new String[] { "foo", "bar", "spam" });
factory.setBeanName("exceptionStep");
SimpleLimitExceptionHandler exceptionHandler = new SimpleLimitExceptionHandler(1);
exceptionHandler.afterPropertiesSet();
factory.setExceptionHandler(exceptionHandler);
factory.setItemWriter(new ItemWriter<String>() {
int count = 0;
@Override