JMockit javaagent isn't initializing JMockit
问题 I've set up JMockit for use with some JUnit tests also using Robolectric, but I am getting errors. I'm primarily using maven to run the tests. When I run the test with mvn test and the javaagent configured as specified here I get the usual exception: java.lang.IllegalStateException: JMockit wasn't properly initialized; check that jmockit.jar precedes junit.jar in the classpath (if using JUnit; if not, check the documentation) I have validated that JMockit is on the classpath before JUnit