ComputerVerificationStrategy extends AbstractTraversalStrategy<TraversalStrategy.VerificationStrategy> implements TraversalStrategy.VerificationStrategy { public static ComputerVerificationStrategy instance() { return INSTANCE; } private  ComputerVerificationStrategy(); @Override void apply(final Traversal.Admin<?, ?> traversal); static ComputerVerificationStrategy instance();  }
@Test public void shouldBeVerifiedIllegal() { final TraversalStrategies strategies = new DefaultTraversalStrategies(); strategies.addStrategies(ComputerVerificationStrategy.instance()); this.traversal.asAdmin().setParent(new TraversalVertexProgramStep(EmptyTraversal.instance(), EmptyTraversal.instance())); this.traversal.asAdmin().setStrategies(strategies); try { this.traversal.asAdmin().applyStrategies(); if (!this.legal) fail("The traversal should not be allowed: " + this.traversal); } catch (final VerificationException ise) { if (this.legal) fail("The traversal should be allowed: " + this.traversal); } }