@Test
    @LoadGraphWith(MODERN)
    public void g_V_localXoutE_foldX_unfold() {
        final Traversal<Vertex, Edge> traversal = get_g_V_localXoutE_foldX_unfold();
        printTraversalForm(traversal);
        int counter = 0;
        final Set<Edge> edges = new HashSet<>();
        while (traversal.hasNext()) {
            counter++;
            edges.add(traversal.next());
        }
        assertEquals(6, counter);
        assertEquals(6, edges.size());
        assertFalse(traversal.hasNext());
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/UnfoldTest.java