public static GraphTraversal create(final Class<? extends Element> clazz) {
            final Graph mockedGraph = mock(Graph.class);
            final Graph.Features features = mock(Graph.Features.class);
            final Graph.Features.VertexFeatures vertexFeatures = mock(Graph.Features.VertexFeatures.class);
            when(mockedGraph.features()).thenReturn(features);
            when(features.vertex()).thenReturn(vertexFeatures);
            when(vertexFeatures.getCardinality(any())).thenReturn(VertexProperty.Cardinality.single);
            final DefaultGraphTraversal t = new DefaultGraphTraversal<>(mockedGraph);
            if (clazz != null) t.asAdmin().addStep(new GraphStep<>(t.asAdmin(), clazz, true));
            return t;
        }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/PartitionStrategyTest.java