@Test public void testAfterRecordWriting() { compositeRecordWriterListener.afterRecordWriting(batch); InOrder inOrder = inOrder(recordWriterListener1, recordWriterListener2); inOrder.verify(recordWriterListener2).afterRecordWriting(batch); inOrder.verify(recordWriterListener1).afterRecordWriting(batch); }
@Override public void afterRecordWriting(Batch<P> batch) { for (ListIterator<RecordWriterListener<P>> iterator = listeners.listIterator(listeners.size()); iterator.hasPrevious();) { iterator.previous().afterRecordWriting(batch); } }
CompositeRecordWriterListener implements RecordWriterListener<P> { @Override public void afterRecordWriting(Batch<P> batch) { for (ListIterator<RecordWriterListener<P>> iterator = listeners.listIterator(listeners.size()); iterator.hasPrevious();) { iterator.previous().afterRecordWriting(batch); } } }
CompositeRecordWriterListener implements RecordWriterListener<P> { @Override public void afterRecordWriting(Batch<P> batch) { for (ListIterator<RecordWriterListener<P>> iterator = listeners.listIterator(listeners.size()); iterator.hasPrevious();) { iterator.previous().afterRecordWriting(batch); } } CompositeRecordWriterListener();  CompositeRecordWriterListener(List<RecordWriterListener<P>> listeners); }
CompositeRecordWriterListener implements RecordWriterListener<P> { @Override public void afterRecordWriting(Batch<P> batch) { for (ListIterator<RecordWriterListener<P>> iterator = listeners.listIterator(listeners.size()); iterator.hasPrevious();) { iterator.previous().afterRecordWriting(batch); } } CompositeRecordWriterListener();  CompositeRecordWriterListener(List<RecordWriterListener<P>> listeners); @Override void beforeRecordWriting(Batch<P> batch); @Override void afterRecordWriting(Batch<P> batch); @Override void onRecordWritingException(Batch<P> batch, Throwable throwable); void addRecordWriterListener(RecordWriterListener<P> recordWriterListener); }
CompositeRecordWriterListener implements RecordWriterListener<P> { @Override public void afterRecordWriting(Batch<P> batch) { for (ListIterator<RecordWriterListener<P>> iterator = listeners.listIterator(listeners.size()); iterator.hasPrevious();) { iterator.previous().afterRecordWriting(batch); } } CompositeRecordWriterListener();  CompositeRecordWriterListener(List<RecordWriterListener<P>> listeners); @Override void beforeRecordWriting(Batch<P> batch); @Override void afterRecordWriting(Batch<P> batch); @Override void onRecordWritingException(Batch<P> batch, Throwable throwable); void addRecordWriterListener(RecordWriterListener<P> recordWriterListener);  }