@Test
        public void shouldSubgraph() {
            final String repr = traversal.getGremlinLang().getGremlin();
            final SubgraphStrategy strategy = SubgraphStrategy.build().edges(__.has("edge")).vertices(__.has("vertex")).create();
            strategy.apply(traversal);

            final List<TraversalFilterStep> steps = TraversalHelper.getStepsOfClass(TraversalFilterStep.class, traversal);
            assertEquals(repr, expectedInsertedSteps, steps.size());
        }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyTest.java