private <T> void reuseAndTest(Class<?> classToRegister, Class<T> classToLookup) {
        ComponentGraph graph = buildGraphAndSetNoConfigs(classToRegister);
        T instance = getComponent(graph, classToLookup);

        ComponentGraph newGraph = buildGraphAndSetNoConfigs(classToRegister);
        newGraph.reuseNodes(graph);
        T instance2 = getComponent(newGraph, classToLookup);

        assertSame(instance2, instance);
    }
@author gjoranv
@author Tony Vaagenes
@author ollivir
container-core/src/test/java/com/yahoo/container/di/componentgraph/core/ReuseComponentsTest.java