added scalacheck and scalatest property based tests