CompositeRecordReaderListener implements RecordReaderListener<P> { @Override public void beforeRecordReading() { for (RecordReaderListener<P> listener : listeners) { listener.beforeRecordReading(); } } CompositeRecordReaderListener();  CompositeRecordReaderListener(List<RecordReaderListener<P>> listeners); @Override void beforeRecordReading(); @Override void afterRecordReading(Record<P> record); @Override void onRecordReadingException(Throwable throwable); void addRecordReaderListener(RecordReaderListener<P> recordReaderListener);  }
@Test public void testBeforeRecordReading() { compositeRecordReaderListener.beforeRecordReading(); InOrder inOrder = inOrder(recordReaderListener1, recordReaderListener2); inOrder.verify(recordReaderListener1).beforeRecordReading(); inOrder.verify(recordReaderListener2).beforeRecordReading(); }