I inherited a Spring project that has about 160 failing JUnit Tests with Mockito classes
When I check in Jenkins, I see that every single test has the following Error details:
Receiver class org.powermock.api.mockito.internal.exceptions.StackTraceCleanerProvider$1 does not define or inherit an implementation of the resolved method 'abstract boolean isIn(java.lang.StackTraceElement)' of interface org.mockito.exceptions.stacktrace.StackTraceCleaner.
and the stacktrace is:
at org.mockito.internal.exceptions.stacktrace.StackTraceFilter.filterFirst(StackTraceFilter.java:110)
at org.mockito.internal.debugging.LocationImpl.computeStackTraceInformation(LocationImpl.java:50)
at org.mockito.internal.debugging.LocationImpl.<init>(LocationImpl.java:35)
at org.mockito.internal.debugging.LocationImpl.<init>(LocationImpl.java:26)
at org.mockito.internal.debugging.LocationImpl.<init>(LocationImpl.java:22)
at org.mockito.internal.creation.bytebuddy.MockMethodInterceptor.doIntercept(MockMethodInterceptor.java:56)
at org.mockito.internal.creation.bytebuddy.MockMethodInterceptor$DispatcherDefaultingToRealMethod.interceptAbstract(MockMethodInterceptor.java:161)
at org.mockito.codegen.ConfigurationService$MockitoMock$1748841625.getConfiguration(Unknown Source)
at abcproductcomparisonaddon.compareviewproviders.impl.DefaultCompareViewAttributeDataProviderUnitTest.setUp(DefaultCompareViewAttributeDataProviderUnitTest.java:52)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at abc.ant.taskdefs.yunit.JUnitTestRunner.run(JUnitTestRunner.java:649)
at abc.ant.taskdefs.yunit.JUnitTestRunner.launch(JUnitTestRunner.java:1374)
at abc.ant.taskdefs.yunit.JUnitTestRunner.main(JUnitTestRunner.java:1164)```
I cannot find anything related to this error or exception.
I have no config access to the jenkins job, but I have the feeling that the used junit oder Mockito version in Jenkins is outdated.
When I run the tests locally per IntelliJ, i do not get the error.