revised Lab5Spec.scala with more unit tests