@Test
    @LoadGraphWith(MODERN)
    public void g_V_coalesceXoutXlikesX_outXknowsX_inXcreatedXX_groupCount_byXnameX() {
        final Traversal<Vertex, Map<String, Long>> traversal = get_g_V_coalesceXoutXlikesX_outXknowsX_inXcreatedXX_groupCount_byXnameX();
        printTraversalForm(traversal);
        assertTrue(traversal.hasNext());
        final Map<String, Long> result = traversal.next();
        assertEquals(4, result.size());
        assertTrue(result.containsKey("josh") && result.containsKey("lop") && result.containsKey("ripple") && result.containsKey("vadas"));
        assertEquals(1L, (long) result.get("josh"));
        assertEquals(2L, (long) result.get("lop"));
        assertEquals(1L, (long) result.get("ripple"));
        assertEquals(1L, (long) result.get("vadas"));
        assertFalse(traversal.hasNext());
    }
@author Daniel Kuppitz (http://gremlin.guru)
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/CoalesceTest.java