private static void mergeInto(Map<String, ComponentSpecification> resultingComponents,
                                  Set<ComponentSpecification> components) {
        for (ComponentSpecification component : components) {
            String name = component.getName();
            if (resultingComponents.containsKey(name)) {
                resultingComponents.put(name, component.intersect(resultingComponents.get(name)));
            } else {
                resultingComponents.put(name, component);
            }
        }
    }
@param allChainSpecifications resolves ChainSpecifications from ComponentSpecifications
                              as given in the inheritance fields.
@param path tracks which chains are used in each recursive invocation of flatten, used for detecting cycles.
@return ChainSpecification directly containing all the component references and phases of the inherited chains.
container-core/src/main/java/com/yahoo/component/chain/model/ChainSpecification.java