BulkProcessorFlusher extends ComponentSupport implements Callable<Void> { @Override public Void call() { log.debug("Trying to flush indexes ..."); bulkProcessor.flush(); log.debug("Finished flushing indexes."); return null; } BulkProcessorFlusher(final BulkProcessor bulkProcessor); @Override Void call();  }
@Test public void runShouldFlushBulkProcessor() { underTest.call(); verify(bulkProcessor).flush(); }