@Override
  public <T> Stream<T> children(String key, Function<Map<String, Object>, T> childConstructor) {
    return Stream.ofNullable(get(key))
            .filter(Objects::nonNull)
            .map(el -> (List<Map<String, Object>>) el)
            .findAny()
            .stream()
            .flatMap(Collection::stream)
            .map(childConstructor);
  }
@Test
  void shouldRetrieveEmptyStreamForNonExistingChildren() {
    var children = document.children(KEY, DocumentImplementation::new);
    assertNotNull(children);
    assertEquals(0, children.count());
  }