@Test
    void require_error_when_multiple_components_match_a_singleton_dependency() {
        assertThrows(RuntimeException.class, () -> {
            ComponentGraph componentGraph = new ComponentGraph();
            componentGraph.add(mockComponentNode(SimpleDerivedComponent.class));
            componentGraph.add(mockComponentNode(SimpleComponent.class));
            componentGraph.add(mockComponentNode(ComponentTakingComponent.class));
            componentGraph.complete();
        });
    }
@author gjoranv
@author Tony Vaagenes
@author ollivir
container-core/src/test/java/com/yahoo/container/di/componentgraph/core/ComponentGraphTest.java