NoSuchMethodError with Hamcrest 1.3 & JUnit 4.11
问题 Another instance of the NoSuchMethodError for the JUnit & Hamcrest combination. Offending code: assertThat(dirReader.document(0).getFields(), hasItem( new FeatureMatcher<IndexableField, String>(equalTo("Patisnummer"), "Field key", "Field key") { @Override protected String featureValueOf(IndexableField actual) { return actual.name(); } } )); Commented lines 152–157 in IndexerTest.java (commit ac72ce) Causes a NoSuchMethodError (see http://db.tt/qkkkTE78 for complete output): java.lang