@Override
    public GraphTraversalSource traversal(final Graph graph) {
        return graph.traversal().withStrategies(VertexProgramStrategy.create(new MapConfiguration(new HashMap<String, Object>() {{
            put(VertexProgramStrategy.WORKERS, RANDOM.nextInt(Runtime.getRuntime().availableProcessors()) + 1);
            put(VertexProgramStrategy.GRAPH_COMPUTER, RANDOM.nextBoolean() ?
                    GraphComputer.class.getCanonicalName() :
                    TinkerGraphComputer.class.getCanonicalName());
        }})));
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/TinkerGraphComputerProvider.java