@@ -0,0 +1,1805 @@
+package org.apache.beam.runners.spark.structuredstreaming.translation.batch;%0A%0Aimport java.io.Serializable;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0Aimport org.apache.beam.runners.spark.structuredstreaming.SparkPipelineOptions;%0Aimport org.apache.beam.runners.spark.structuredstreaming.SparkRunner;%0Aimport org.apache.beam.sdk.Pipeline;%0Aimport org.apache.beam.sdk.options.PipelineOptions;%0Aimport org.apache.beam.sdk.options.PipelineOptionsFactory;%0Aimport org.apache.beam.sdk.transforms.Create;%0Aimport org.apache.beam.sdk.transforms.GroupByKey;%0Aimport org.apache.beam.sdk.transforms.ParDo;%0Aimport org.apache.beam.sdk.values.KV;%0Aimport org.apache.beam.sdk.values.PCollection;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Ignore;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.junit.runners.JUnit4;%0A%0A/**%0A * Test class for beam to spark %7B@link ParDo%7D translation.%0A */%0A@RunWith(JUnit4.class)%0Apublic class GroupByKeyTest implements Serializable %7B%0A  private static Pipeline pipeline;%0A%0A  @BeforeClass%0A  public static void beforeClass()%7B%0A    PipelineOptions options = PipelineOptionsFactory.create().as(SparkPipelineOptions.class);%0A    options.setRunner(SparkRunner.class);%0A    pipeline = Pipeline.create(options);%0A  %7D%0A%0A  @Ignore(%22fails with Unable to create serializer %22%0A      + %22%5C%22com.esotericsoftware.kryo.serializers.FieldSerializer%5C%22 for class: %22%0A      + %22worker.org.gradle.internal.UncheckedException in last map step%22)%0A  @Test%0A  public void testGroupByKey()%7B%0A    Map%3CInteger, Integer%3E elems = new HashMap%3C%3E();%0A    elems.put(1, 1);%0A    elems.put(1, 3);%0A    elems.put(1, 5);%0A    elems.put(2, 2);%0A    elems.put(2, 4);%0A    elems.put(2, 6);%0A    PCollection%3CKV%3CInteger, Integer%3E%3E input = pipeline.apply(Create.of(elems));%0A    input.apply(GroupByKey.create());%0A    pipeline.run();%0A  %7D%0A%0A%7D%0A

Add GroupByKeyTest