Fixed broken tests in ScriptRunner and rewritten in ScalaTest