@Test
    @LoadGraphWith(MODERN)
    public void g_V_elementMap() {
        final Traversal<Vertex, Map<Object, Object>> traversal = get_g_V_elementMap();
        printTraversalForm(traversal);
        int counter = 0;
        while (traversal.hasNext()) {
            counter++;
            final Map<Object, Object> values = traversal.next();
            final String name = (String) values.get("name");
            assertEquals(4, values.size());
            if (name.equals("marko")) {
                assertEquals(29, values.get("age"));
                assertEquals("person", values.get(label));
            } else if (name.equals("josh")) {
                assertEquals(32, values.get("age"));
                assertEquals("person", values.get(label));
            } else if (name.equals("peter")) {
                assertEquals(35, values.get("age"));
                assertEquals("person", values.get(label));
            } else if (name.equals("vadas")) {
                assertEquals(27, values.get("age"));
                assertEquals("person", values.get(label));
            } else if (name.equals("lop")) {
                assertEquals("java", values.get("lang"));
                assertEquals("software", values.get(label));
            } else if (name.equals("ripple")) {
                assertEquals("java", values.get("lang"));
                assertEquals("software", values.get(label));
            } else {
                throw new IllegalStateException("It is not possible to reach here: " + values);
            }

            assertThat(values.containsKey(T.id), is(true));
        }
        assertEquals(6, counter);
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ElementMapTest.java