code: public List<Resource<L>> getResourcesBreadthFirst() {
          graphLockRead.lock();
          try {
              List<Resource<L>> result = new ArrayList<Resource<L>>();
  
              Set<Resource<L>> roots = getRootResources();
              if (roots.isEmpty()) {
                  return Collections.emptyList();
              }
  
              // loop over each root resource and traverse their tree hierarchy breadth-first
              // roots.forEach(root -> new BreadthFirstIterator<>(ResourceManager.this.resourcesGraph, root)
              //     .forEachRemaining(it -> result.add(it)));
              for (Resource<L> root : roots) {
                  GraphIterator<Resource<L>, DefaultEdge> it = new BreadthFirstIterator<Resource<L>, DefaultEdge>(
                          ResourceManager.this.resourcesGraph, root);
                  while (it.hasNext()) {
                      result.add(it.next());
                  }
              }
  
              return Collections.unmodifiableList(result);
          } finally {
              graphLockRead.unlock();
          }
      }
docs: Returns an immutable {@link List} of all {@link Resource}s contained in {@link #resourcesGraph} in breadth-first
  order.
  
  @return the list of all {@link Resource}s