出现这个问题 主要原因是
pom.xml中 jmock包 一定要在junit包之上 ( 注意顺序!!!!)
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
<version>1.36</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
然后 还有个很坑的 地方 就是 要在 build 那 要加入
-ea -javaagent:C:(你的路径)/.m2/repository/org/jmockit/jmockit/1.49/jmockit-1.49.jar