@Test
    public void shouldWrapIterator()  {
        final List<String> stuff = Arrays.asList("this stuff", "that stuff", "other stuff");
        final CloseableIterator<String> itty = new DefaultCloseableIterator<>(stuff.iterator());
        assertThat(itty.hasNext(), is(true));
        assertEquals("this stuff", itty.next());
        assertThat(itty.hasNext(), is(true));
        assertEquals("that stuff", itty.next());
        assertThat(itty.hasNext(), is(true));
        assertEquals("other stuff", itty.next());
        assertThat(itty.hasNext(), is(false));

        // this is a do-nothing, but we should still be able to call it
        itty.close();
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/util/CloseableIteratorTest.java