When I use the following test I get a WARNING:
WARNING: JMockit was initialized on demand, which may cause certain tests to fail; please check the d
I had no difficulties running my tests in Maven but I got the same error when I was running them in eclipse.
The JMockit Eclipse plugin allowed me to run all the test in eclipse without any extra configuration.
https://marketplace.eclipse.org/content/jmockit-eclipse
One of the featues of this plugin is
Automatically adds JMockit jar as -javaagent argument to JUnit launches.