@Test
public void testForEach() {

    JSONObject rawObj = new JSONObject();
    JsonArray subject = withLs(new JsonArray(asList(true, rawObj))).requireArray();
    JsonArrayIterator iterator = mock(JsonArrayIterator.class);
    subject.forEach(iterator);
    verify(iterator).apply(0, JsonValue.of(true));
    verify(iterator).apply(1, JsonValue.of(rawObj));
}