Qual é a diferença entre os hasItems, os contém e os contémInAnyOrder?

O Hamcrest fornece vários matchers para afirmar o conteúdo de uma coleção. Todos esses casos passam:

Collection<String> c = ImmutableList.of("one", "two", "three");
assertThat(c, hasItems("one", "two", "three");
assertThat(c, contains("one", "two", "three");
assertThat(c, containsInAnyOrder("one", "two", "three");

ComohasItems, contains econtainsInAnyOrder diferem?

questionAnswers(1)

yourAnswerToTheQuestion