CompoundScroll implements DatabaseScroll { @Override public void accept(final SearchHit hit) throws IOException { for (final DatabaseScroll consumer : scrolls) { consumer.accept(hit); } }  @Override void onStartBatch(); @Override void accept(final SearchHit hit); @Override void onEndBatch();  }
@Test public void shouldAccept() throws IOException { final CompoundScroll scroll = new CompoundScroll(ImmutableSet.of(first, second)); scroll.accept(hit); verify(first).accept(hit); verify(second).accept(hit); }