@Test
    void component_is_deconstructed_when_not_reused() {
        writeBootstrapConfigs("id1", DestructableComponent.class);

        Container container = newContainer(dirConfigSource);

        ComponentGraph oldGraph = getNewComponentGraph(container);
        DestructableComponent componentToDestruct = oldGraph.getInstance(DestructableComponent.class);

        writeBootstrapConfigs("id2", DestructableComponent.class);
        container.reloadConfig(2);
        ComponentGraph newGraph = getNewComponentGraph(container, oldGraph);
        assertTrue(componentToDestruct.deconstructed);

        container.shutdownConfigRetriever();
        container.shutdown(newGraph);
    }
@author Tony Vaagenes
@author gjoranv
@author ollivir
container-core/src/test/java/com/yahoo/container/di/ContainerTest.java