单元测试使用Junit框架包冲突
问题:
java.lang.SecurityException: class "org.hamcrest.Matchers"'s signer information does not match signer information of other classes in the same package
问题来源:
在单元测试使用JUnit框架中可能会同时需要加入JUnit4和新的assertThat中的方法,使用assertThat中的一些方法需要导入:hamcrest-library.jar、hamcrest-core.jar包。