test_class.file: spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/SparkSingleIterationStrategyTest.java
test_class.identifier: SparkSingleIterationStrategyTest
test_class.superclass: extends AbstractSparkTest
test_case.body: @Test
      public void shouldSuccessfullyEvaluateSingleIterationTraversals() throws Exception {
          final String outputLocation = TestHelper.makeTestDataDirectory(SparkSingleIterationStrategyTest.class, UUID.randomUUID().toString());
          Configuration configuration = getBaseConfiguration();
          configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, SparkHadoopGraphProvider.PATHS.get("tinkerpop-modern.kryo"));
          configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, GryoInputFormat.class.getCanonicalName());
          configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_WRITER, PersistedOutputRDD.class.getCanonicalName());
          configuration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, outputLocation);
          configuration.setProperty(Constants.GREMLIN_HADOOP_DEFAULT_GRAPH_COMPUTER, SparkGraphComputer.class.getCanonicalName());
          configuration.setProperty(Constants.GREMLIN_SPARK_PERSIST_CONTEXT, true);
  
          Graph graph = GraphFactory.open(configuration);
          GraphTraversalSource g = graph.traversal().withComputer().withoutStrategies(SparkInterceptorStrategy.class);
          assertFalse(g.getStrategies().toList().contains(SparkInterceptorStrategy.instance()));
          assertFalse(g.V().count().explain().toString().contains(SparkInterceptorStrategy.class.getSimpleName()));
          assertTrue(g.getStrategies().toList().contains(SparkSingleIterationStrategy.instance()));
          assertTrue(g.V().count().explain().toString().contains(SparkSingleIterationStrategy.class.getSimpleName()));
  
          test(true, g.V().limit(10));
          test(true, g.V().values("age").groupCount());
          test(true, g.V().groupCount().by(__.out().count()));
          test(true, g.V().outE());
          test(true, 6l, g.V().count());
          test(true, 6l, g.V().out().count());
          test(true, 6l, g.V().local(__.inE()).count());
          test(true, 6l, g.V().outE().inV().count());
          ////
          test(false, g.V().outE().inV());
          test(false, g.V().both());
          test(false, 12l, g.V().both().count());
          test(false, g.V().out().id());
          test(false, 2l, g.V().out().out().count());
          test(false, 6l, g.V().in().count());
          test(false, 6l, g.V().inE().count());
      }
test_case.class_method_signature: SparkSingleIterationStrategyTest.shouldSuccessfullyEvaluateSingleIterationTraversals()
test_case.full_signature: @Test public void shouldSuccessfullyEvaluateSingleIterationTraversals()
test_case.identifier: shouldSuccessfullyEvaluateSingleIterationTraversals
test_case.invocations: makeTestDataDirectory toString randomUUID getBaseConfiguration setProperty get setProperty getCanonicalName setProperty getCanonicalName setProperty setProperty getCanonicalName setProperty open withoutStrategies withComputer traversal assertFalse contains toList getStrategies instance assertFalse contains toString explain count V getSimpleName assertTrue contains toList getStrategies instance assertTrue contains toString explain count V getSimpleName test limit V test groupCount values V test by groupCount V count out test outE V test count V test count out V test count local V inE test count inV outE V test inV outE V test both V test count both V test id out V test count out out V test count in V test count inE V
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldSuccessfullyEvaluateSingleIterationTraversals()
focal_class.declarator: INSTANCE = new SparkSingleIterationStrategy()
focal_class.modifier: private static final
focal_class.original_string: private static final SparkSingleIterationStrategy INSTANCE = new SparkSingleIterationStrategy();
focal_class.type: SparkSingleIterationStrategy
focal_class.var_name: INSTANCE
focal_class.declarator: MULTI_ITERATION_CLASSES = new HashSet<>(Arrays.asList(
              EdgeVertexStep.class,
              LambdaMapStep.class, // maybe?
              LambdaFlatMapStep.class // maybe?
              // VertexStep is special as you need to see if the return class is Edge or Vertex (logic below)
      ))
focal_class.modifier: private static final
focal_class.original_string: private static final Set<Class> MULTI_ITERATION_CLASSES = new HashSet<>(Arrays.asList(
              EdgeVertexStep.class,
              LambdaMapStep.class, // maybe?
              LambdaFlatMapStep.class // maybe?
              // VertexStep is special as you need to see if the return class is Edge or Vertex (logic below)
      ));
focal_class.type: Set<Class>
focal_class.var_name: MULTI_ITERATION_CLASSES
focal_class.file: spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/SparkSingleIterationStrategy.java
focal_class.identifier: SparkSingleIterationStrategy
focal_class.interfaces: implements TraversalStrategy.ProviderOptimizationStrategy
focal_class.class_method_signature: SparkSingleIterationStrategy.SparkSingleIterationStrategy()
focal_class.full_signature: private  SparkSingleIterationStrategy()
focal_class.identifier: SparkSingleIterationStrategy
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  SparkSingleIterationStrategy()
focal_class.class_method_signature: SparkSingleIterationStrategy.apply(final Traversal.Admin<?, ?> traversal)
focal_class.full_signature: @Override public void apply(final Traversal.Admin<?, ?> traversal)
focal_class.identifier: apply
focal_class.modifiers: @Override public
focal_class.parameters: (final Traversal.Admin<?, ?> traversal)
focal_class.return: void
focal_class.signature: void apply(final Traversal.Admin<?, ?> traversal)
focal_class.class_method_signature: SparkSingleIterationStrategy.instance()
focal_class.full_signature: public static SparkSingleIterationStrategy instance()
focal_class.identifier: instance
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: SparkSingleIterationStrategy
focal_class.signature: SparkSingleIterationStrategy instance()
focal_class.superclass: extends AbstractTraversalStrategy<TraversalStrategy.ProviderOptimizationStrategy>
focal_method.body: public static SparkSingleIterationStrategy instance() {
          return INSTANCE;
      }
focal_method.class_method_signature: SparkSingleIterationStrategy.instance()
focal_method.full_signature: public static SparkSingleIterationStrategy instance()
focal_method.identifier: instance
focal_method.modifiers: public static
focal_method.parameters: ()
focal_method.return: SparkSingleIterationStrategy
focal_method.signature: SparkSingleIterationStrategy instance()