@Test
public void testMapArrayOfObjects() {

    final JsonArray jsonInputs = arr()
            .val(key("one", "eno"))
            .val(key("two", "owt"))
            .val(key("three", "eerht")).get();
    final List<Map.Entry<String, String>> expected = Arrays.asList(
            toEntry("one", "eno"),
            toEntry("two", "owt"),
            toEntry("three", "eerht"));
    assertEquals("should create list of entries", expected,
            mapArrayOfObjects(jsonInputs, jsonObject -> jsonObject.entrySet().stream()
                    .map(compose1(mapValue(JsonString.class::cast), mapValue(JsonString::getString)))
                    .findFirst().orElse(null)));
    final JsonArray jsonInputsWithNonObjects = arr()
            .val(key("one", "eno"))
            .val(null)
            .val(key("two", "owt"))
            .val(4)
            .val(key("three", "eerht")).get();
    assertEquals("should create list of entries", expected,
            mapArrayOfObjects(jsonInputsWithNonObjects, jsonObject -> jsonObject.entrySet().stream()
                    .map(compose1(mapValue(JsonString.class::cast), mapValue(JsonString::getString)))
                    .findFirst().orElse(null)));
}