Working tests for core API of Spark