Fix scalatest configuration and fix unit tests