CompositeRecordWriter implements RecordWriter<P> { @Override public void open() throws Exception { for (RecordWriter<P> writer : writers) { writer.open(); } } CompositeRecordWriter(List<RecordWriter<P>> writers); @Override void open(); @Override void writeRecords(Batch<P> batch); @Override void close();  }
@Test public void testOpen() throws Exception { compositeRecordWriter.open(); InOrder inOrder = inOrder(recordWriter1, recordWriter2); inOrder.verify(recordWriter1).open(); inOrder.verify(recordWriter2).open(); }