public COMPONENT getComponent(ComponentSpecification id) {
        Map<String, Map<Version, COMPONENT>> componentVersionsByName = componentsByNameByNamespace.get(id.getNamespace());
        if (componentVersionsByName == null) return null;  // No matching namespace

        Map<Version, COMPONENT> versions = componentVersionsByName.get(id.getName());
        if (versions == null) return null; // No versions of this component

        Version version = findBestMatch(id.getVersionSpecification(), versions.keySet());
        //if (version==null) return null; // No matching version

        return versions.get(version);
    }
Returns a component. If the id does not specify an (exact) version, the newest (matching) version is returned.
For example, if version 3.1 is specified and we have 3.1.0, 3.1.1 and 3.1.3 registered, 3.1.3 is returned.

@param id the id of the component to return. May not include a version, or include
       an underspecified version, in which case the highest (matching) version which
       does not contain a qualifier is returned
@return the search chain or null if no component of this name (and matching version, if specified) is registered
component/src/main/java/com/yahoo/component/provider/ComponentRegistry.java