CompositeBatchListener implements BatchListener<P> { @Override public void beforeBatchReading() { for (BatchListener<P> listener : listeners) { listener.beforeBatchReading(); } } CompositeBatchListener();  CompositeBatchListener(List<BatchListener<P>> listeners); @Override void beforeBatchReading(); @Override void afterBatchProcessing(Batch<P> batch); @Override void afterBatchWriting(Batch<P> batch); @Override void onBatchWritingException(Batch<P> batch, Throwable throwable); void addBatchListener(final BatchListener<P> batchListener);  }
@Test public void testBeforeBatchReading() { compositeBatchListener.beforeBatchReading(); InOrder inOrder = inOrder(batchListener1, batchListener2); inOrder.verify(batchListener1).beforeBatchReading(); inOrder.verify(batchListener2).beforeBatchReading(); }