@Test
    @LoadGraphWith(MODERN)
    public void g_V_both_groupCountXaX_out_capXaX_selectXkeysX_unfold_both_groupCountXaX_capXaX() {
        final Traversal<Vertex, Map<Vertex, Long>> traversal = get_g_V_both_groupCountXaX_out_capXaX_selectXkeysX_unfold_both_groupCountXaX_capXaX();
        printTraversalForm(traversal);
        //  [{v[1]=6, v[2]=2, v[3]=6, v[4]=6, v[5]=2, v[6]=2}]
        final Map<Vertex, Long> map = traversal.next();
        assertFalse(traversal.hasNext());
        assertEquals(6, map.size());
        assertEquals(6l, map.get(convertToVertex(graph, "marko")).longValue());
        assertEquals(2l, map.get(convertToVertex(graph, "vadas")).longValue());
        assertEquals(6l, map.get(convertToVertex(graph, "lop")).longValue());
        assertEquals(6l, map.get(convertToVertex(graph, "josh")).longValue());
        assertEquals(2l, map.get(convertToVertex(graph, "ripple")).longValue());
        assertEquals(6l, map.get(convertToVertex(graph, "marko")).longValue());
        checkSideEffects(traversal.asAdmin().getSideEffects(), "a", HashMap.class);
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupCountTest.java