I don't love the fact that this test helper method just has to mirror the pattern in the SparkContext constructor, but I didn't see another good way to do it.