### Question:
AbstractDocument implements Document { @Override public <T> Stream<T> children(String key, Function<Map<String, Object>, T> constructor) { return Stream.ofNullable(get(key)) .filter(Objects::nonNull) .map(el -> (List<Map<String, Object>>) el) .findAny() .stream() .flatMap(Collection::stream) .map(constructor); } protected  AbstractDocument(Map<String, Object> properties); @Override Void put(String key, Object value); @Override Object get(String key); @Override Stream<T> children(String key, Function<Map<String, Object>, T> constructor); @Override String toString();  }### Answer:
@Test public void shouldRetrieveEmptyStreamForNonExistingChildren() { var children = document.children(KEY, DocumentImplementation::new); assertNotNull(children); assertEquals(0, children.count()); }