@Test
    public void shouldBeVerifiedIllegal() {
        final String repr = traversal.getGremlinLang().getGremlin();

        final TraversalStrategies strategies = new DefaultTraversalStrategies();
        strategies.addStrategies(ComputerVerificationStrategy.instance());
        this.traversal.asAdmin().setParent(new TraversalVertexProgramStep(EmptyTraversal.instance(), EmptyTraversal.instance())); // trick it
        this.traversal.asAdmin().setStrategies(strategies);
        try {
            this.traversal.asAdmin().applyStrategies();
            if (!this.legal)
                fail("The traversal should not be allowed: " + repr);
        } catch (final VerificationException ise) {
            if (this.legal)
                fail("The traversal should be allowed: " + repr);
        }
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategyTest.java