DependencyGraphImpl implements DependencyGraph { @Override public Stream<DependencyNode> nodes() { return nodes.values().stream(); } DependencyGraphImpl(Function<Class<?>, InjectorProxy> proxyFunction); @Override DependencyNode get(Class<?> clazz); @Override DependencyNode getOrCreate(Class<?> clazz); @Override Optional<DependencyNode> getIfPresent(Class<?> clazz); @Override DependencyGraph inject(); @Override Stream<DependencyNode> nodes();  }
@Test void nodes() { instance.nodes().forEach(System.out::println); assertEquals(1, instance.nodes().count()); instance.getOrCreate(Foo.class); assertEquals(2, instance.nodes().count()); }