调整jmockit和junit在classpath中的顺序
<!-- JMockit must be before JUnit in the classpath --> <dependency> <groupId> com.googlecode.jmockit</groupId > <artifactId> jmockit</artifactId > <version>1.0</version> <scope> test</scope > </dependency> <!-- Junit --> <dependency> <groupId> junit</groupId > <artifactId> junit</artifactId > <version>4.10</version> <scope> test</scope > </dependency> <dependency> <groupId> org.hamcrest</groupId > <artifactId> hamcrest-all </artifactId> <version> 1.1</version > <scope> test</scope > </dependency> new MockUp<Class>(){ @Mock method(){} }
jmocket官方地址
https://code.google.com/p/jmockit/
参考文章
http://www.haogongju.net/art/1763416
http://wenku.baidu.com/view/d0c866de6f1aff00bed51eda.html