PathProcessorStrategy extends AbstractTraversalStrategy<TraversalStrategy.OptimizationStrategy> implements TraversalStrategy.OptimizationStrategy { public static PathProcessorStrategy instance() { return INSTANCE; } private  PathProcessorStrategy(); @Override Set<Class<? extends OptimizationStrategy>> applyPrior(); @Override Set<Class<? extends OptimizationStrategy>> applyPost(); @Override void apply(final Traversal.Admin<?, ?> traversal); static PathProcessorStrategy instance();  }
@Test public void doTest() { final Traversal.Admin<?, ?> rootTraversal = new DefaultGraphTraversal<>(); final TraversalParent parent = new TraversalVertexProgramStep(rootTraversal, this.original.asAdmin()); rootTraversal.addStep(parent.asStep()); this.original.asAdmin().setParent(parent); final TraversalStrategies strategies = new DefaultTraversalStrategies(); strategies.addStrategies(PathProcessorStrategy.instance()); for (final TraversalStrategy strategy : this.otherStrategies) { strategies.addStrategies(strategy); } this.original.asAdmin().setStrategies(strategies); this.original.asAdmin().applyStrategies(); assertEquals(this.optimized, this.original); }