title: Mock a Spark RDD in the unit tests
body: <p>Is it possible to mock a RDD without using sparkContext?</p>
  
  <p>I want to unit test the following utility function:</p>
  
  <pre><code> def myUtilityFunction(data1: org.apache.spark.rdd.RDD[myClass1], data2: org.apache.spark.rdd.RDD[myClass2]): org.apache.spark.rdd.RDD[myClass1] = {...}
  </code></pre>
  
  <p>So I need to pass data1 and data2 to myUtilityFunction. How can I create a data1 from a mock org.apache.spark.rdd.RDD[myClass1], instead of create a real RDD from SparkContext? Thank you!</p>