Why is scalatest MockitoSugar deprecated?
问题 I'm new to writing junit tests in Scala and I'm using Mockito to mock objects. I'm also using scalatest_2.12-3.0.4 . The ScalaTest documentation (like here) shows the syntax to create the mock using MockitoSugar, i.e. val mockCollaborator = mock[Collaborator] Eclipse shows org.scalatest.mock.MockitoSugar crossed out in the import statement, indicating it is deprecated. The only alternative I've found is, don't use MockitoSugar and instead do: val mockCollaborator = mock(classOf[Collaborator])