after update mockito from 2.0.2-BETA to 2.10.0, got a lot of unit test failure with the following error message:
org.mockito.exceptions.base.MockitoException:
ClassCastException occurred while creating the mockito mock :
class to mock : 'act.app.App', loaded by classloader : 'sun.misc.Launcher$AppClassLoader@18b4aac2'
created class : 'act.app.App$MockitoMock$1065839695', loaded by classloader : 'net.bytebuddy.dynamic.loading.MultipleParentClassLoader@282cb7c7'
proxy instance class : 'act.app.App$MockitoMock$1065839695', loaded by classloader : 'net.bytebuddy.dynamic.loading.MultipleParentClassLoader@282cb7c7'
instance creation by : ObjenesisInstantiator
You might experience classloading issues, please ask the mockito mailing-list.
Was this resolved? Or is there any workaround other than extending the test class with PowerMockTestCase?
I am using PowerMock 1.7.1 with TestNG 6.10 and Mockito-core 2.8.9
Getting the same exception as above
after update mockito from 2.0.2-BETA to 2.10.0, got a lot of unit test failure with the following error message: