@Test
    @LoadGraphWith(MODERN)
    public void g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXedges_outEX_withXpropertyName_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX() {
        TestHelper.assumeNonDeterministic();
        final Traversal<Vertex, Map<Object, List<Object>>> traversal = get_g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXedges_outEX_withXpropertyName_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX();
        printTraversalForm(traversal);
        final List<Map<Object, List<Object>>> results = traversal.toList();
        assertEquals(6, results.size());
        final Map<String, Object> clusters = new HashMap<>();
        results.forEach(m -> clusters.put((String) m.get("name").get(0), m.get("cluster").get(0)));
        assertEquals(2, results.get(0).size());
        assertEquals(6, clusters.size());
        assertEquals(clusters.get("josh"), clusters.get("ripple"));
        assertEquals(clusters.get("josh"), clusters.get("lop"));
        final Set<Object> ids = new HashSet<>(clusters.values());
        assertEquals(4, ids.size());
        assertTrue(ids.contains(convertToVertexId("marko")));
        assertTrue(ids.contains(convertToVertexId("vadas")));
        assertTrue(ids.contains(convertToVertexId("josh")));
        assertTrue(ids.contains(convertToVertexId("peter")));
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PeerPressureTest.java