some fix and add scalatest