@Test
    void require_that_node_depending_on_guice_node_is_reused() {
        Supplier<ComponentGraph> makeGraph = () -> {
            ComponentGraph graph = new ComponentGraph();
            graph.add(mockComponentNode(ComponentTakingExecutor.class, "dummyId"));
            graph.complete(ComponentGraphTest.singletonExecutorInjector);
            graph.setAvailableConfigs(Map.of());
            return graph;
        };

        Function<ComponentGraph, ComponentTakingExecutor> componentRetriever = graph -> getComponent(graph, ComponentTakingExecutor.class);

        ComponentGraph oldGraph = makeGraph.get();
        componentRetriever.apply(oldGraph);  // Ensure creation of GuiceNode
        ComponentGraph newGraph = makeGraph.get();
        newGraph.reuseNodes(oldGraph);
        assertSame(componentRetriever.apply(oldGraph), componentRetriever.apply(newGraph));
    }
@author gjoranv
@author Tony Vaagenes
@author ollivir
container-core/src/test/java/com/yahoo/container/di/componentgraph/core/ReuseComponentsTest.java