When I make fun of objects in Junit tests using PowerMock and Mockito, I get this exception

java.lang.NoClassDefFoundError: org / mockito / exceptions / base / MockitoSerializationIssue

+6
source share
3 answers

I got this when combining PowerMock with Mockito. Fixed using compatible version as shown here: https://github.com/powermock/powermock/wiki/Mockito#supported-versions

+11
source

Check the version of your mockito lib. I see the class org.mockito.exceptions.base.MockitoSerializationIssue in 2.0.2 beta. He is not in 1.9.5.

+1
source

You do not need to use a beta version. The last 1.10.x should also work. I had the same problem when using 1.9.5, but with the change to 1.10.19 the problem was fixed.

+1
source

Source: https://habr.com/ru/post/984313/


All Articles