title: Create JavaRDD from List without SparkContext
body: <p>I am writing some JUnit unit tests around a spark project.</p>
  
  <p>One of the functions that I am attempting to test accepts a JavaRDD as a parameter, and I would like to create that JavaRDD programmatically, and converting from a List to the RDD seems like the most logical approach. </p>
  
  <p><a href="https://stackoverflow.com/questions/24952401/how-to-convert-list-to-javardd">How to convert List to JavaRDD</a> suggests that I use <a href="https://spark.apache.org/docs/latest/api/java/org/apache/spark/api/java/JavaSparkContext.html#parallelize(java.util.List)" rel="nofollow noreferrer"><code>JavaSparkContext.parallelize(List)</code></a>. However, seeing as I am doing this in a unit test, I do not want to instantiate a SparkContext object.</p>