public static void verifyRootIdentification(final Traversal.Admin<?, ?> traversal, final boolean expectRoot) {
        assertThat(traversal.isRoot(), is(expectRoot));
        for (final Step<?,?> step : traversal.getSteps()) {
            if (step instanceof TraversalParent) {
                for (final Traversal.Admin<?, ?> globalTraversal : ((TraversalParent) step).getGlobalChildren()) {
                    verifyRootIdentification(globalTraversal, false);
                }
                for (final Traversal.Admin<?, ?> localTraversal : ((TraversalParent) step).getLocalChildren()) {
                    verifyRootIdentification(localTraversal, false);
                }
            }
        }
    }
Ensures that the {@link Traversal} and all of its children is constructed in a fashion where the parent/child
relationship is properly established.
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java