fb.setJobRepository(new JobRepositorySupport());
fb.setStartLimit(5);
fb.setListeners(new StepListener[] { new StepExecutionListenerSupport() });
fb.setTaskExecutor(new SyncTaskExecutor());
SimplePartitioner partitioner = new SimplePartitioner();
fb.setPartitioner(partitioner);
TaskExecutorPartitionHandler partitionHandler = new TaskExecutorPartitionHandler();
partitionHandler.setStep(new StepSupport("foo"));
ProxyFactory factory = new ProxyFactory(partitionHandler);
fb.setPartitionHandler((PartitionHandler) factory.getProxy());