// Path: src/test/java/com/thoughtworks/datacommons/prepbuddy/api/JavaSparkTestCase.java
// public class JavaSparkTestCase implements Serializable {
//     protected transient JavaSparkContext javaSparkContext;
// 
//     @Before
//     public void setUp() throws Exception {
//         SparkConf sparkConf = new SparkConf().setAppName(getClass().getName()).setMaster("local");
//         Logger.getLogger("org").setLevel(Level.OFF);
//         Logger.getLogger("akka").setLevel(Level.OFF);
//         javaSparkContext = new JavaSparkContext(sparkConf);
//     }
// 
//     @After
//     public void tearDown() throws Exception {
//         javaSparkContext.close();
//     }
// }
// 
// Path: src/main/scala/com/thoughtworks/datacommons/prepbuddy/api/java/types/FileType.java
// public class FileType {
//     public static final com.thoughtworks.datacommons.prepbuddy.types.FileType CSV = CSV$.MODULE$;
//     public static final com.thoughtworks.datacommons.prepbuddy.types.FileType TSV = TSV$.MODULE$;
// }


import com.thoughtworks.datacommons.prepbuddy.api.JavaSparkTestCase;
import com.thoughtworks.datacommons.prepbuddy.api.java.types.FileType;
import com.thoughtworks.datacommons.prepbuddy.imputations.*;
import com.thoughtworks.datacommons.prepbuddy.rdds.TransformableRDD;
import com.thoughtworks.datacommons.prepbuddy.utils.RowRecord;
import org.apache.spark.api.java.JavaRDD;
import org.junit.Test;
import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
package com.thoughtworks.datacommons.prepbuddy.api.java;




public class JavaImputationTest extends JavaSparkTestCase {
    @Test
    public void shouldImputeTheValueWithTheMean() {
        JavaRDD<String> initialDataSet = javaSparkContext.parallelize(Arrays.asList(
                "07434677419,07371326239,Incoming,31,Wed Sep 15 19:17:44 +0100 2010",
                "07641036117,01666472054,Outgoing,20,Mon Feb 11 07:18:23 +0000 1980",
                "07641036117,07371326239,Incoming, ,Mon Feb 11 07:45:42 +0000 1980",
                "07641036117,07681546436,Missed,12,Mon Feb 11 08:04:42 +0000 1980"

        ));
// Path: src/test/java/com/thoughtworks/datacommons/prepbuddy/api/JavaSparkTestCase.java
// public class JavaSparkTestCase implements Serializable {
//     protected transient JavaSparkContext javaSparkContext;
// 
//     @Before
//     public void setUp() throws Exception {
//         SparkConf sparkConf = new SparkConf().setAppName(getClass().getName()).setMaster("local");
//         Logger.getLogger("org").setLevel(Level.OFF);
//         Logger.getLogger("akka").setLevel(Level.OFF);
//         javaSparkContext = new JavaSparkContext(sparkConf);
//     }
// 
//     @After
//     public void tearDown() throws Exception {
//         javaSparkContext.close();
//     }
// }
// 
// Path: src/main/scala/com/thoughtworks/datacommons/prepbuddy/api/java/types/FileType.java
// public class FileType {
//     public static final com.thoughtworks.datacommons.prepbuddy.types.FileType CSV = CSV$.MODULE$;
//     public static final com.thoughtworks.datacommons.prepbuddy.types.FileType TSV = TSV$.MODULE$;
// }


// Path: src/test/java/com/thoughtworks/datacommons/prepbuddy/api/java/JavaImputationTest.java
import com.thoughtworks.datacommons.prepbuddy.api.JavaSparkTestCase;
import com.thoughtworks.datacommons.prepbuddy.api.java.types.FileType;
import com.thoughtworks.datacommons.prepbuddy.imputations.*;
import com.thoughtworks.datacommons.prepbuddy.rdds.TransformableRDD;
import com.thoughtworks.datacommons.prepbuddy.utils.RowRecord;
import org.apache.spark.api.java.JavaRDD;
import org.junit.Test;
import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

package com.thoughtworks.datacommons.prepbuddy.api.java;




public class JavaImputationTest extends JavaSparkTestCase {
    @Test
    public void shouldImputeTheValueWithTheMean() {
        JavaRDD<String> initialDataSet = javaSparkContext.parallelize(Arrays.asList(
                "07434677419,07371326239,Incoming,31,Wed Sep 15 19:17:44 +0100 2010",
                "07641036117,01666472054,Outgoing,20,Mon Feb 11 07:18:23 +0000 1980",
                "07641036117,07371326239,Incoming, ,Mon Feb 11 07:45:42 +0000 1980",
                "07641036117,07681546436,Missed,12,Mon Feb 11 08:04:42 +0000 1980"

        ));
        JavaTransformableRDD initialRDD = new JavaTransformableRDD(initialDataSet, FileType.CSV);