I have created mock:
GuiExHandler mockGuiEx = EasyMock.createMock(MockedClass.class);
And Im getting following exception:
Testcase: testAction(someClass):
Caused an ERROR org.objectweb.asm.ClassWriter.<init>(I)V
java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V
I’m sure that MockedClass exists. What is the reason of this issue?
EasyMock depends on cglib which in turn depends on ASM. From the exception, it appears cglib is calling an ASM constructor that does not exist. So, the version of ASM being used is incompatible with the version of cglib being used. Verify the versions of ASM and cglib you are using and confirm they are the versions supported by the version of EasyMock you are using.