private ConfigInstance getConfigInstance(ConfigKey<?> key) {
        if (! availableConfigs.containsKey(key))
            throw new IllegalArgumentException("Config not found in the map of available configs: " + key);
        else if (availableConfigs.get(key) == null)
            throw new IllegalStateException("The map of available configs has a null config for: " + key);

        return availableConfigs.get(key);
    }
@author Tony Vaagenes
@author gjoranv
@author ollivir
container-core/src/main/java/com/yahoo/container/di/componentgraph/core/ComponentNode.java