public static Map<String, String> patchConfig(
            Map<String, String> config,
            Map<String, String> patch
    ) {
        Map<String, String> result = new HashMap<>(config);
        patch.forEach((k, v) -> {
            if (v != null) {
                result.put(k, v);
            } else {
                result.remove(k);
            }
        });
        return result;
    }
Apply a patch on a connector config.

<p>In the output, the values from the patch will override the values from the config.
{@code null} values will cause the corresponding key to be removed completely.
@param config the config to be patched.
@param patch the patch.
@return the output config map.
connect/runtime/src/main/java/org/apache/kafka/connect/util/ConnectUtils.java