public static <COMPONENT> ComponentRegistry<COMPONENT> singleton(ComponentId id, COMPONENT component) {
        ComponentRegistry<COMPONENT> registry = new ComponentRegistry<>();
        registry.register(id, component);
        registry.freeze();
        return registry;
    }
Returns a frozen registry with a single component, for convenience
component/src/main/java/com/yahoo/component/provider/ComponentRegistry.java