@Test
    void all_components_of_a_type_can_be_injected() {
        ComponentGraph componentGraph = new ComponentGraph();
        componentGraph.add(mockComponentNode(SimpleComponent.class));
        componentGraph.add(mockComponentNode(SimpleComponent.class));
        componentGraph.add(mockComponentNode(SimpleDerivedComponent.class));
        componentGraph.add(mockComponentNode(ComponentTakingAllSimpleComponents.class));
        componentGraph.complete();

        ComponentTakingAllSimpleComponents instance = componentGraph.getInstance(ComponentTakingAllSimpleComponents.class);
        assertEquals(3, instance.simpleComponents.allComponents().size());
    }
@author gjoranv
@author Tony Vaagenes
@author ollivir
container-core/src/test/java/com/yahoo/container/di/componentgraph/core/ComponentGraphTest.java