fixing tests in Spark