@Test
    public void shouldStream() throws Exception {
        final Stream<Result> stream = resultSet.stream();
        final AtomicInteger counter = new AtomicInteger(0);

        addToQueue(100, 1, true, true);

        stream.forEach(r -> counter.incrementAndGet());

        assertEquals(100, counter.get());
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ResultSetTest.java