@Test
    public void shouldGetStepsOfAssignableClassRecursivelyFromDepthEnsureOrder() {
        final Traversal.Admin<?,?> traversal = __.V().union(
                __.union(__.values("a"),
                         __.union(__.values("b"), __.union(__.values("c"))),
                         __.values("d")),
                __.values("e")).values("f").asAdmin();
        final List<Step<?,?>> steps = TraversalHelper.getStepsOfAssignableClassRecursivelyFromDepth(traversal, PropertiesStep.class);
        assertEquals(6, steps.size());
        assertEquals("c", ((PropertiesStep) steps.get(0)).getPropertyKeys()[0]);
        assertEquals("b", ((PropertiesStep) steps.get(1)).getPropertyKeys()[0]);
        assertEquals("d", ((PropertiesStep) steps.get(2)).getPropertyKeys()[0]);
        assertEquals("a", ((PropertiesStep) steps.get(3)).getPropertyKeys()[0]);
        assertEquals("e", ((PropertiesStep) steps.get(4)).getPropertyKeys()[0]);
        assertEquals("f", ((PropertiesStep) steps.get(5)).getPropertyKeys()[0]);
    }
@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