test_class.file: spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/SparkInterceptorStrategyTest.java
test_class.identifier: SparkInterceptorStrategyTest
test_class.superclass: extends AbstractSparkTest
test_case.body: @Test
      public void shouldHandleSideEffectsCorrectly() throws Exception {
          final 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, TestHelper.makeTestDataDirectory(SparkSingleIterationStrategyTest.class, UUID.randomUUID().toString()));
          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(SparkSingleIterationStrategy.class);
          assertFalse(g.getStrategies().toList().contains(SparkSingleIterationStrategy.instance()));
          assertFalse(g.V().count().explain().toString().contains(SparkSingleIterationStrategy.class.getSimpleName()));
          assertTrue(g.getStrategies().toList().contains(SparkInterceptorStrategy.instance()));
          assertTrue(g.V().count().explain().toString().contains(SparkInterceptorStrategy.class.getSimpleName()));
          /// groupCount(m)-test
          Traversal.Admin<Vertex, Long> traversal = g.V().groupCount("m").by(T.label).count().asAdmin();
          test(SparkStarBarrierInterceptor.class, 6l, traversal);
          assertEquals(1, traversal.getSideEffects().keys().size());
          assertTrue(traversal.getSideEffects().exists("m"));
          assertTrue(traversal.getSideEffects().keys().contains("m"));
          final Map<String, Long> map = traversal.getSideEffects().get("m");
          assertEquals(2, map.size());
          assertEquals(2, map.get("software").intValue());
          assertEquals(4, map.get("person").intValue());
      }
test_case.class_method_signature: SparkInterceptorStrategyTest.shouldHandleSideEffectsCorrectly()
test_case.full_signature: @Test public void shouldHandleSideEffectsCorrectly()
test_case.identifier: shouldHandleSideEffectsCorrectly
test_case.invocations: getBaseConfiguration setProperty get setProperty getCanonicalName setProperty getCanonicalName setProperty makeTestDataDirectory toString randomUUID 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 asAdmin count by groupCount V test assertEquals size keys getSideEffects assertTrue exists getSideEffects assertTrue contains keys getSideEffects get getSideEffects assertEquals size assertEquals intValue get assertEquals intValue get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldHandleSideEffectsCorrectly()
focal_class.declarator: INSTANCE = new SparkInterceptorStrategy()
focal_class.modifier: private static final
focal_class.original_string: private static final SparkInterceptorStrategy INSTANCE = new SparkInterceptorStrategy();
focal_class.type: SparkInterceptorStrategy
focal_class.var_name: INSTANCE
focal_class.file: spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/SparkInterceptorStrategy.java
focal_class.identifier: SparkInterceptorStrategy
focal_class.interfaces: implements TraversalStrategy.ProviderOptimizationStrategy
focal_class.class_method_signature: SparkInterceptorStrategy.SparkInterceptorStrategy()
focal_class.full_signature: private  SparkInterceptorStrategy()
focal_class.identifier: SparkInterceptorStrategy
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  SparkInterceptorStrategy()
focal_class.class_method_signature: SparkInterceptorStrategy.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: SparkInterceptorStrategy.instance()
focal_class.full_signature: public static SparkInterceptorStrategy instance()
focal_class.identifier: instance
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: SparkInterceptorStrategy
focal_class.signature: SparkInterceptorStrategy instance()
focal_class.superclass: extends AbstractTraversalStrategy<TraversalStrategy.ProviderOptimizationStrategy>
focal_method.body: public static SparkInterceptorStrategy instance() {
          return INSTANCE;
      }
focal_method.class_method_signature: SparkInterceptorStrategy.instance()
focal_method.full_signature: public static SparkInterceptorStrategy instance()
focal_method.identifier: instance
focal_method.modifiers: public static
focal_method.parameters: ()
focal_method.return: SparkInterceptorStrategy
focal_method.signature: SparkInterceptorStrategy instance()