Added a scalacheck test.