private Object findArgument(Type param) {
        for (ModelNode dependency : dependencies.values()) {
            if (param.equals(dependency.clazz))
                return dependency.instances.get(0);
            if (isCollectionOf(param, dependency.clazz))
                return Collections.unmodifiableCollection(dependency.instances);
        }
        // For collections, we don't require that dependency has been added, we just give an empty collection
        if (isCollection(param))
            return List.of();
        throw new IllegalArgumentException("Unable to find constructor argument " + param + " for " + clazz.getName());
    }
This adds dependencies base on constructor arguments in the model classes themselves.
These then have to be created by this mini-di framework and then handed to the builders
that will fill them.

TODO: This should be changed to model dependencies between model builders instead, such
that they can create their model objects, and eventually make them immutable.
config-model/src/main/java/com/yahoo/config/model/graph/ModelNode.java