Comments (2)
I think this might be similar, but I'm getting the below exception :
java.lang.VerifyError: org/mockito/cglib/core/ReflectUtils
which occurs with a failure to setup: dexmaker-1.0.jar and
dexmaker-mockito-1.0.jar
However I HAVE set those up properly, because my exissting mockito tests work
fine. Power mock seems to be ignoring them.
---------
java.lang.VerifyError: org/mockito/cglib/core/ReflectUtils
at
org.mockito.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:167)
at
org.mockito.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrateg
y.java:25)
at
org.mockito.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java
:217)
at org.mockito.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:117)
at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:109)
at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:105)
at org.mockito.cglib.proxy.Enhancer.<clinit>(Enhancer.java:70)
at
org.mockito.internal.creation.jmock.ClassImposterizer.createProxyClass(ClassImpo
sterizer.java:85)
at
org.mockito.internal.creation.jmock.ClassImposterizer.imposterise(ClassImposteri
zer.java:62)
at
org.powermock.api.mockito.internal.mockcreation.MockCreator.createMethodInvocati
onControl(MockCreator.java:109)
at
org.powermock.api.mockito.internal.mockcreation.MockCreator.mock(MockCreator.jav
a:57)
at org.powermock.api.mockito.PowerMockito.mockStatic(PowerMockito.java:70)
at tests.ExampleTest.testRegisterService(ExampleTest.java:186)
at java.lang.reflect.Method.invokeNative(Native Method)
at
android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
at
android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
at
android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:55
4)
at
android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701)
Original comment by [email protected]
on 24 Feb 2015 at 10:01
from powermock.
I'm having the exact same issue.
My tests using Mockito are running fine, but when I try to do a
PowerMockito.spy I get an exception:
java.lang.VerifyError: org/mockito/cglib/core/ReflectUtils
Has anyone been able to fix this?
Original comment by [email protected]
on 13 Apr 2015 at 8:25
from powermock.
Related Issues (20)
- Tests Classes cannot inherit another class if we want to use @PowerMockRunnerDelegate with a runner that extends ParentRunner HOT 1
- junit 4.12 throws Field 'fTestClass' was not found in class org.junit.internal.runners.MethodValidator exception HOT 10
- PowerMock doesn't work with JUnit 4.12 HOT 3
- java.lang.IllegalAccessError when using PowerMock 1.6.0 and Mockito 1.10.16 HOT 2
- Unable to verifyPrivate a method : maybe a bug in the withArguments method
- powermock throws loader constraint violation error:when resolving method "org.apache.log4j.LogManager.getLogger HOT 2
- Support for Dexmaker Android
- Powermock does not play well with java.time HOT 3
- Powermock agent dies with VerifyError
- Fix in PowerMockMockito 1.6.1 doesn't work for junit 4.12 as version id is 4.12-SNAPSHOT
- Powermock affect the Unmarshal convert *.xml to *.class
- PowerMockito: Mocking two static methods of two different classes breaks the first mocked static method when the second mocked method is called HOT 1
- Changelog lies about "Fixed Mockito 1.10.9+ incompatibility"
- MockClassLoader#loadMockClass fails to preserve original ProtectionDomain of classes prepared for test
- PowerMockTestCase subclass test crashes
- Problem while mocking javax.ws.rs.core.Request object with Mockito.mock(Request.class)
- createMockAndExpectNew does not support collaborators with constructors with Array HOT 1
- Unable to mock final and private classes when using @PowerMockRunnerDelegate(PowerMockRunner.class)
- Problem with try without sentences HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powermock.