@Test
    public void shouldHandleMapIteratedResult() throws Exception {
        RequestOptions options = RequestOptions.build().addG("gmodern").create();
        final ResultSet results = client.submit("g.V().groupCount().by(bothE().count())", options);
        final List<Result> resultList = results.all().get();
        final Map m = resultList.get(0).get(HashMap.class);
        assertEquals(2, m.size());
        assertEquals(3L, m.get(1L));
        assertEquals(3L, m.get(3L));
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinResultSetIntegrateTest.java