@Test
    public void shouldCloseIterators() {

        final MultiIterator<String> itty = new MultiIterator<>();
        final DummyAutoCloseableIterator<String> inner1 = new DummyAutoCloseableIterator<>();
        final DummyAutoCloseableIterator<String> inner2 = new DummyAutoCloseableIterator<>();
        itty.addIterator(inner1);
        itty.addIterator(inner2);

        itty.close();

        assertTrue(inner1.isClosed());
        assertTrue(inner2.isClosed());
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/util/iterator/MultiIteratorTest.java