@Test
        public void shouldParseNestedGraphTraversal() {
            final GremlinLexer lexer = new GremlinLexer(CharStreams.fromString(script));
            final GremlinParser parser = new GremlinParser(new CommonTokenStream(lexer));
            final GremlinParser.QueryContext ctx = parser.query();
            final Object result = new GremlinAntlrToJava().visitQuery(ctx);

            assertEquals(expected.toString(), result.toString());
        }
Test multiple level of nested graph traversal step
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/ComplexTraversalMethodVisitorTest.java