@Test
    public void shouldHaveAllItemsAvailableOnReadComplete() throws InterruptedException {
        assertThat(resultSet.allItemsAvailable(), is(false));
        readCompleted.complete(null);
        // flush all tasks in pool
        pool.awaitTermination(2, TimeUnit.SECONDS);
        assertThat(resultSet.allItemsAvailable(), is(true));
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ResultSetTest.java