wujun / powermock

Automatically exported from code.google.com/p/powermock
Apache License 2.0
0 stars 0 forks source link

expectNew doesn't work with EasyMock 3.2 #454

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use JUnit, PowerMock 1.5.1 and EasyMock 3.2
2. Apply PowerMock's expectNew example.
3. See the error below.

What is the expected output? What do you see instead?
 - Passed test.
 - This error:
org.powermock.reflect.exceptions.FieldNotFoundException: No instance field of 
type "org.easymock.internal.MocksControl$MockType" could be found in the class 
hierarchy of org.easymock.internal.MocksControl.

What version of the product are you using? On what operating system?
PowerMock 1.5.1
EasyMock 3.2

Please provide any additional information below.
It seems EasyMock 3.2 is breaking.
I'm not alone with this issue:
http://stackoverflow.com/questions/17788926/org-powermock-reflect-exceptions-fie
ldnotfoundexception-when-using-powermock-exp

Original issue reported on code.google.com by jonatan.ivanov on 23 Aug 2013 at 2:35

GoogleCodeExporter commented 9 years ago
Have you tried with the version in trunk? If not please try it out and see if 
it works.

Original comment by johan.ha...@gmail.com on 21 Sep 2013 at 3:46

GoogleCodeExporter commented 9 years ago
I'm not really keen on using trunk, have you any estimation for the next 
release?

Original comment by jonatan.ivanov on 21 Sep 2013 at 10:04

GoogleCodeExporter commented 9 years ago
I just ask you to try it out once and see if it makes any difference, you don't 
have to use it. If there are any bugs in trunk that I'm not aware of this is 
the only for me to fix them. PowerMock is open source and I work on it on my 
spare time so it's really important that people help out with testing.

Original comment by johan.ha...@gmail.com on 22 Sep 2013 at 7:13

GoogleCodeExporter commented 9 years ago
Hello Johan,

Sorry for the late answer, I've tried it out today and it seems the current 
state of trunk eliminates the issue above. I used the following libs:

easymock 3.2
cglib-nodep 2.2.2
objenesis 1.3
junit 4.11
hamcrest-core 1.3
javassist 3.18.1-GA

Original comment by jonatan.ivanov on 6 Oct 2013 at 7:23

GoogleCodeExporter commented 9 years ago
Thank you for your help.

Original comment by johan.ha...@gmail.com on 7 Oct 2013 at 5:52