public <T extends ConfigInstance> T getConfig(Class<T> configClass, String configId) {
        try {
            ConfigInstance.Builder builder = getConfig(getBuilder(configClass).getDeclaredConstructor().newInstance(), configId);
            return configClass.getConstructor(builder.getClass()).newInstance(builder);
        } catch (ReflectiveOperationException e) {
            throw new RuntimeException(e);
        }
    }
Use for testing. Use as parent for the config producer(s) you want to test, to test
only a subtree of the producers.

@author gjoranv
config-model/src/main/java/com/yahoo/config/model/test/MockRoot.java