@Test
    public void shouldIdentifyGlobalChildren() {
        final Traversal.Admin<?, ?> globalChild = __.select("a", "b").by("name").asAdmin();
        TraversalParent parent = new RepeatStep<>(new DefaultTraversal());
        ((RepeatStep) parent).setRepeatTraversal(globalChild);
        assertTrue(TraversalHelper.isGlobalChild(globalChild));
        ///
        new UnionStep<>(new DefaultTraversal(), globalChild);
        assertTrue(TraversalHelper.isGlobalChild(globalChild));
        ///
        new TraversalVertexProgramStep(new DefaultTraversal<>(), globalChild);
        assertTrue(TraversalHelper.isGlobalChild(globalChild));
        ///
        final Traversal.Admin<?, ?> remoteRemoteChild = __.repeat(globalChild).asAdmin();
        new UnionStep<>(new DefaultTraversal(), remoteRemoteChild);
        assertTrue(TraversalHelper.isGlobalChild(globalChild));
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelperTest.java