Closed GoogleCodeExporter closed 8 years ago
I found a solution, don't know if it's a clean one but it works for me :
@PowerMockIgnore({ "javax.management.*", "javax.xml.parsers.*",
"com.sun.org.apache.xerces.internal.jaxp.*", "ch.qos.logback.*",
"org.slf4j.*" })
Mat
Original comment by yoda...@gmail.com
on 1 Dec 2011 at 5:49
Hi,
Sorry to say but unfortunately you have to resort to ugly fixes like that in
some cases. How ever you can extract all of the ignored packages to a reusable
mock policy (see documentation) so that you don't have to repeat it all over
the place.
Another solution would be to use the PowerMock javaagent (see docs again) but
it's highly experimental and may not work in all situations.
/Johan
Original comment by johan.ha...@gmail.com
on 4 Dec 2011 at 9:33
Hi,
iam also getting the same error like,
java.lang.ClassCastException:
com.org.test.ITestInterface$$EnhancerByMockitoWithCGLIB$$c3ce6cd8 cannot be
cast to org.mockito.cglib.proxy.Factory
could anyone give the solution for the above.
Thanks in advance
Vanisree
Original comment by mvanisre...@gmail.com
on 8 Mar 2012 at 4:33
@Matthieu the detailed description is great, i did encounter the same issue.
And your solution also fix my issue.
One pain point is that i have to run the test a couple times to see how many
packages need to be in my @PowerMockIgnore annotation which make it more like a
workaround but not a solution..
Original comment by suliang...@gmail.com
on 12 Nov 2013 at 5:56
Original issue reported on code.google.com by
yoda...@gmail.com
on 1 Dec 2011 at 12:57