@Test
    public void shouldProduceExpectedTraverser() {
        final GraphTraversalSource traversalSource = EmptyGraph.instance().traversal();
        final Object start = new Object();

        Traversal.Admin traversal = traversalSource.V().out().asAdmin();
        traversal.applyStrategies();
        assertEquals(B_O_Traverser.class, traversal.getTraverserGenerator().generate(start, traversal.getStartStep(), 1l).getClass());
        //
        traversal = traversalSource.V().out().barrier().asAdmin();
        traversal.applyStrategies();
        assertEquals(B_O_Traverser.class, traversal.getTraverserGenerator().generate(start, traversal.getStartStep(), 1l).getClass());
        //
        traversal = traversalSource.V().repeat(__.out()).times(10).asAdmin();
        traversal.applyStrategies();
        assertEquals(B_O_S_SE_SL_Traverser.class, traversal.getTraverserGenerator().generate(start, traversal.getStartStep(), 1l).getClass());
        //
        traversal = traversalSource.V().repeat(__.repeat(__.out())).times(10).asAdmin();
        traversal.applyStrategies();
        assertEquals(B_NL_O_S_SE_SL_Traverser.class, traversal.getTraverserGenerator().generate(start, traversal.getStartStep(), 1l).getClass());
        //
        traversal = traversalSource.V().out().sack().asAdmin();
        traversal.applyStrategies();
        assertEquals(B_O_S_SE_SL_Traverser.class, traversal.getTraverserGenerator().generate(start, traversal.getStartStep(), 1l).getClass());
        //
        traversal = traversalSource.V().out().sack().as("a").select("a").asAdmin();
        traversal.applyStrategies();
        assertEquals(B_LP_O_S_SE_SL_Traverser.class, traversal.getTraverserGenerator().generate(start, traversal.getStartStep(), 1l).getClass());
        //
        traversal = traversalSource.V().out().path().asAdmin();
        traversal.applyStrategies();
        assertEquals(B_LP_O_P_S_SE_SL_Traverser.class, traversal.getTraverserGenerator().generate(start, traversal.getStartStep(), 1l).getClass());
        //
        traversal = traversalSource.withBulk(false).V().out().asAdmin();
        traversal.applyStrategies();
        assertEquals(O_OB_S_SE_SL_Traverser.class, traversal.getTraverserGenerator().generate(start, traversal.getStartStep(), 1l).getClass());
        //
        traversal = traversalSource.withBulk(false).V().as("a").out().select("a").asAdmin();
        traversal.applyStrategies();
        assertEquals(LP_O_OB_S_SE_SL_Traverser.class, traversal.getTraverserGenerator().generate(start, traversal.getStartStep(), 1l).getClass());
        //
        traversal = traversalSource.withBulk(false).V().out().path().asAdmin();
        traversal.applyStrategies();
        assertEquals(LP_O_OB_P_S_SE_SL_Traverser.class, traversal.getTraverserGenerator().generate(start, traversal.getStartStep(), 1l).getClass());
        //
        traversal = traversalSource.withBulk(false).V().repeat(__.repeat(__.out())).times(10).path().asAdmin();
        traversal.applyStrategies();
        assertEquals(LP_NL_O_OB_P_S_SE_SL_Traverser.class, traversal.getTraverserGenerator().generate(start, traversal.getStartStep(), 1l).getClass());

    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/util/DefaultTraverserGeneratorFactoryTest.java