Converted tests to use ScalaCheck