I'm trying to partially mock a class from a signed Jar file (actually, the target class is in the Eclipse API).
Is there any way to do that with Mockito? I tried out several workarounds, but the result is always something like this:
org.mockito.cglib.core.CodeGenerationException:
java.lang.reflect.InvocationTargetException-->null
...
Caused by: java.lang.reflect.InvocationTargetException
...
Caused by: java.lang.SecurityException:
class "org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate$$
FastClassByMockitoWithCGLIB$$6e308a80"'s
signer information does not match signer information of other classes
in the same package
...
A Bit of Googling showed me that PowerMock might help me, but I would like to avoid introducing a new dependency for my project.
Thanks in advance!