Hamcrest Cheatsheet Collection Matchers Check if a collection contains a single item assertThat(collection, hasItem("item1")); assertThat(collection, not(hasItem("item2")));