@Test
    public void shouldIterateAnArray() {
        final String[] arr = new String[3];
        arr[0] = "test1";
        arr[1] = "test2";
        arr[2] = "test3";

        final Iterator<String> itty = new ArrayIterator<>(arr);
        assertEquals("test1", itty.next());
        assertEquals("test2", itty.next());
        assertEquals("test3", itty.next());

        assertFalse(itty.hasNext());
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/util/iterator/ArrayIteratorTest.java