@Test
    public void doTest() {
        final Traversal.Admin<?, ?> rootTraversal = new DefaultGraphTraversal<>();
        final TraversalVertexProgramStep parent = new TraversalVertexProgramStep(rootTraversal, this.original.asAdmin());
        rootTraversal.addStep(parent.asStep());
        parent.setComputerTraversal(this.original.asAdmin());
        final TraversalStrategies strategies = new DefaultTraversalStrategies();
        strategies.addStrategies(MessagePassingReductionStrategy.instance());
        for (final TraversalStrategy strategy : this.otherStrategies) {
            strategies.addStrategies(strategy);
        }
        rootTraversal.setStrategies(strategies);
        rootTraversal.asAdmin().applyStrategies();
        assertEquals(this.optimized, parent.computerTraversal.get());
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/optimization/MessagePassingReductionStrategyTest.java