Testing code for Apache Spark