### Question:
NodeStreamFactoryImpl implements NodeStreamFactory { @Override public <E, N extends OpenNode<E, N>, T extends Tree<E, N>> Stream<N> breadthFirstStream(T tree) { final Spliterator<N> spliterator = spliterator(iterators.breadthFirstIterator(tree)); return StreamSupport.stream(spliterator, false); } NodeStreamFactoryImpl(TreeIteratorFactory iterators); @Override Stream<N> preOrderStream(T tree); @Override Stream<N> inOrderStream(T tree); @Override Stream<N> postOrderStream(T tree); @Override Stream<N> breadthFirstStream(T tree); @Override Stream<N> sortedStream(T tree);  }### Answer:
@Test public void breadthFirstStream() { final List<? extends MutableSettableStructuredNode<String>> list = streamFactory .breadthFirstStream(tree) .collect(Collectors.toList()); assertEquals("root", list.get(0).getElement()); assertEquals("a", list.get(1).getElement()); assertEquals("b", list.get(2).getElement()); assertEquals("c", list.get(3).getElement()); }