importstaticorg.hamcrest.MatcherAssert.assertThat;importstaticorg.hamcrest.Matchers.hasItem;importstaticorg.hamcrest.Matchers.equalTo;assertThat(actual,hasItem(hasProperty("id",equalTo(1L))));其中actual是一个ID为Long的POJO。我明白了,ThemethodassertThat(T,Matcher)inthetypeMatcherAssertisnotapplicableforthear