Added test with ScalaCheck