public static Map<String, Object> merge(Map<String, Object> orig, Map<String, Object> update) {
        final Map<String, Object> merged = new HashMap<>(orig);
        update.forEach((k, v) -> {
            if (orig.get(k) instanceof EncryptedValue origValue && v instanceof EncryptedValue newValue) {
                merged.put(k, mergeEncryptedValues(origValue, newValue));
            } else {
                merged.put(k, v);
            }
        });
        return merged;
    }
@Test
    void testMerge_replaceValue() {
        final Map<String, Object> orig = Map.of(
                "unencrypted", "old unencrypted",
                "encrypted", encryptedValueService.encrypt("old encrypted")
        );
        final Map<String, Object> update = Map.of(
                "unencrypted", "new unencrypted",
                "encrypted", encryptedValueService.encrypt("new encrypted")
        );

        assertThat(EncryptedInputConfigs.merge(orig, update)).isEqualTo(update);
    }