ElasticScrollingFactory implements DatabaseScrollingFactory { @Override public DatabaseScroll combine(final DatabaseScroll... scrolls) { return new CompoundScroll(copyOf(scrolls)); }  @Override DatabaseScrolling newScroll(final String index); @Override DatabaseScrolling newScroll(final SearchRequestBuilder search); @Override DatabaseScroll bulkDelete(); @Override DatabaseScroll bulkIndex(); @Override DatabaseScroll combine(final DatabaseScroll... scrolls); static final int DEFAULT_SCROLL_SIZE; }
@Test public void shouldCombine() { final ElasticScrollingFactory factory = new ElasticScrollingFactory(client); final DatabaseScroll combine = factory.combine(scroll); assertEquals(CompoundScroll.class, combine.getClass()); }