FilterSmallDelaysProcessor implements ItemProcessor<BatchExcelRow, BatchExcelRow>, InitializingBean { @Override public BatchExcelRow process(final BatchExcelRow item) throws Exception { BatchExcelRow result = null; LOGGER.trace("item", item); if (item.getDelay() >= threshold) { LOGGER.debug("keep_delay>=" + threshold, item); result = item; } LOGGER.trace("result", result); return result; }  @Override void afterPropertiesSet(); @Override BatchExcelRow process(final BatchExcelRow item); void setThreshold(Long threshold);  }
@Test public void testFilter() throws Exception { Assert.assertNull(processor.process(new BatchExcelRow .Builder(LocalDate.now(), Sens.ARRIVAL) .delay(14L) .build(false))); }
@Test public void testNotFilter() throws Exception { Assert.assertNotNull(processor.process(new BatchExcelRow .Builder(LocalDate.now(), Sens.ARRIVAL) .delay(15L) .build(false))); }