-
Notifications
You must be signed in to change notification settings - Fork 583
Description
What steps will reproduce the problem?
@PrepareForTest(ClassWithStaticMethod.class)
public class Test{
@BeforeClass
public static void beforeClass() throws Exception {
PowerMockito.spy(ClassWithStaticMethod.class);
}
What is the expected output?
No error
What do you see instead?
java.lang.NoSuchMethodError: org.mockito.internal.handler.MockHandlerFactory.create(Lorg/mockito/mock/MockCreationSettings;)Lorg/mockito/internal/InternalMockHandler;
at org.powermock.api.mockito.internal.mockcreation.MockCreator.createMethodInvocationControl(MockCreator.java:121)
What version of the product are you using?
JUnit 4.11
Mockito 2.2.8
PowerMockito 1.6.5
On what operating system? Windows
Please provide any additional information below.
Since this modification which has been tagged on Mockito release 2.0.55-beta :
MockHandlerFactory
has been modified from:
public InternalMockHandler create(MockCreationSettings settings) {
to:
public static InternalMockHandler createMockHandler(MockCreationSettings settings) {
DefaultMockCreator class still rely on the old version