@Test
    @LoadGraphWith(MODERN)
    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = FEATURE_ADD_VERTICES)
    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = FEATURE_ADD_EDGES)
    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = FEATURE_USER_SUPPLIED_IDS)
    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = FEATURE_USER_SUPPLIED_IDS)
    public void g_V_withSideEffectXsgX_outEXknowsX_subgraphXsgX_name_capXsgX() throws Exception {
        final Configuration config = graphProvider.newGraphConfiguration("subgraph", this.getClass(), name.getMethodName(), MODERN);
        graphProvider.clear(config);
        Graph subgraph = graphProvider.openTestGraph(config);
        /////
        final Traversal<Vertex, Graph> traversal = get_g_V_withSideEffectXsgX_outEXknowsX_subgraphXsgX_name_capXsgX(convertToVertexId("marko"), subgraph);
        printTraversalForm(traversal);
        subgraph = traversal.next();
        assertVertexEdgeCounts(subgraph, 3, 2);
        subgraph.edges().forEachRemaining(e -> {
            assertEquals("knows", e.label());
            assertEquals("marko", g.E(e).outV().values("name").next());
            assertEquals(new Integer(29), g.E(e).outV().<Integer>values("age").next());
            assertEquals("person", g.E(e).outV().label().next());

            final String name = g.E(e).inV().<String>values("name").next();
            if (name.equals("vadas"))
                assertEquals(0.5d, g.E(e).<Double>values("weight").next(), 0.0001d);
            else if (name.equals("josh"))
                assertEquals(1.0d, g.E(e).<Double>values("weight").next(), 0.0001d);
            else
                fail("There's a vertex present that should not be in the subgraph");
        });
        graphProvider.clear(subgraph, config);
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/SubgraphTest.java