TinkerGraphCountStrategy extends AbstractTraversalStrategy<TraversalStrategy.ProviderOptimizationStrategy> implements TraversalStrategy.ProviderOptimizationStrategy { public static TinkerGraphCountStrategy instance() { return INSTANCE; } private  TinkerGraphCountStrategy(); @Override void apply(final Traversal.Admin<?, ?> traversal); @Override Set<Class<? extends ProviderOptimizationStrategy>> applyPost(); static TinkerGraphCountStrategy instance();  }
@Test public void doTest() { final TraversalStrategies strategies = new DefaultTraversalStrategies(); strategies.addStrategies(TinkerGraphCountStrategy.instance()); for (final TraversalStrategy strategy : this.otherStrategies) { strategies.addStrategies(strategy); } if (this.optimized == null) { this.optimized = this.original.asAdmin().clone(); this.optimized.asAdmin().setStrategies(strategies); this.optimized.asAdmin().applyStrategies(); } this.original.asAdmin().setStrategies(strategies); this.original.asAdmin().applyStrategies(); assertEquals(this.optimized, this.original); }