FilterCanceledItemsProcessor implements ItemProcessor<BatchExcelRow, BatchExcelRow> { @Override public BatchExcelRow process(final BatchExcelRow item) throws Exception { BatchExcelRow result = item; LOGGER.trace("item", item); if (item.isCanceled()) { LOGGER.debug("cancelled", item); result = null; } LOGGER.trace("result", result); return result; }  @Override BatchExcelRow process(final BatchExcelRow item);  }
@Test public void testCanceled() throws Exception { Assert.assertNull(processor.process( new BatchExcelRow.Builder(LocalDate.now(), Sens.ARRIVAL) .canceled(true) .build(false)) ); }
@Test public void testNotCanceled() throws Exception { Assert.assertNotNull(processor.process( new BatchExcelRow.Builder(LocalDate.now(), Sens.ARRIVAL) .canceled(false) .build(false)) ); }