public static <T extends ConfigInstance> T getNewInstance(Class<T> type, String configId, ConfigPayload payload) {
        T instance;
        try {
            ConfigTransformer<?> transformer = new ConfigTransformer<>(type);
            ConfigInstance.Builder instanceBuilder = transformer.toConfigBuilder(payload);
            Constructor<T> constructor = type.getConstructor(instanceBuilder.getClass());
            instance = constructor.newInstance(instanceBuilder);
            instance.postInitialize(configId);
            setConfigId(instance, configId);
        } catch (InstantiationException | InvocationTargetException | NoSuchMethodException |
                 NoSuchFieldException | IllegalAccessException e) {
            throw new IllegalArgumentException("Failed creating new instance of '" + type.getCanonicalName() +
                                               "' for config id '" + configId + "'", e);
        }
        return instance;
    }
Copies all values that have been explicitly set on the source to the destination.
Values that have not been explicitly set in the source builder, will be left unchanged
in the destination.

@param destination the builder to copy values into
@param source the builder to copy values from. Unset values are not copied
@param <BUILDER> the builder class
config/src/main/java/com/yahoo/config/subscription/ConfigInstanceUtil.java