@Test
    @LoadGraphWith(MODERN)
    public void shouldCloneTraversalForReuse() {
        final DefaultTraversal<Vertex, Long> t = (DefaultTraversal) g.V().count();
        assertEquals(6, t.next().intValue());
        assertThat(t.hasNext(), is(false));

        final DefaultTraversal<Vertex, Long> t1 = t.clone();
        assertEquals(6, t1.next().intValue());
        assertThat(t1.hasNext(), is(false));

        final DefaultTraversal<Vertex, Long> t2 = t.clone();
        assertEquals(6, t2.next().intValue());
        assertThat(t2.hasNext(), is(false));

        final DefaultTraversal<Vertex, Long> t3 = t1.clone();
        assertEquals(6, t3.next().intValue());
        assertThat(t3.hasNext(), is(false));
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
@author Pieter Martin
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/CoreTraversalTest.java