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
In addition to Gary Rowe's solution:
A more robust (i.e. version and repository path agnostic) integration of JMockit into Surefire would be
-javaagent:${org.jmockit:jmockit:jar}
To make this resolution work, the maven-dependency-plugin (version >= 2.5.1!) needs to be configured like this:
maven-dependency-plugin
2.5.1
getClasspathFilenames
properties