Need help in Lab test

First of all, i would suggest you start with the syntax shown below
import org.scalatest.flatspec.AnyFlatSpec

class FirstSpec extends AnyFlatSpec {
// tests go here…
}
I agree scala could be quite confusing while doing particular lab tests. Therefore I would suggest you opt different testing strategies like akka framework or test automation. Sometimes you need to test whether a method throws an expected exception under certain circumstances and these framework or strategies will be a much better option.