@Test
public void testHasItems() throws IOException
{
String jsonString = "[\n" +
" \"hello\", \"world\"\n" +
"]";
JsonNode json = new ObjectMapper().readTree(jsonString);
assertThat(json, is(jsonArray(hasItem(is(jsonText("hello")))))); //this works
assertThat(json, is(jsonArray(hasItem(is(jsonText("world")))))); //this does not
assertThat(json, is(jsonArray(hasItems(is(jsonText("hello")))))); //this works
assertThat(json, is(jsonArray(hasItems(is(jsonText("world")))))); //this does not
assertThat(json, is(jsonArray(hasItems(is(jsonText("hello")), is(jsonText("world")))))); //this does not
assertThat(json, is(jsonArray(contains(is(jsonText("hello")), is(jsonText("world")))))); //this works
}