mockito-scala does not work with mockito 4.8.0 and above
bursauxa opened this issue · 1 comments
bursauxa commented
Hello,
We are using mockito-scala 1.17.12. When upgrading to Mockito 4.8.0 or above, tests break with the following:
java.lang.NoClassDefFoundError: org/mockito/internal/debugging/LocationImpl
at org.mockito.stubbing.ReturnsSmartNulls$ThrowsSmartNullPointer$.apply$default$2(ReturnsSmartNulls.scala:25)
at org.mockito.stubbing.ReturnsSmartNulls$.$anonfun$apply$1(ReturnsSmartNulls.scala:20)
at scala.Option.orElse(Option.scala:477)
This is likely related to mockito/mockito#2723 from the 4.8.0 release.
We found out because one of our projects has a direct dependency on mockito-inline (drop-in replacement for mockito-core), so in that project mockito gets version bumps independently from mockito-scala. I assume this is not a typical setup.