code: public static Resource wrapMerge(@NotNull Resource resource, @NotNull ValueMap valueMap) {
      Map<String, Object> mergedProperties = new HashMap<>();
      mergedProperties.putAll(resource.getValueMap());
      mergedProperties.putAll(valueMap);
      return wrap(resource, new ValueMapDecorator(mergedProperties), resource.getChildren());
    }
docs: Wrap a real resource and create a synthetic resource out of it.
  Merges the given properties with the existing properties of the resource.
  @param resource Real resource
  @param valueMap Properties to be merged with the real properties
  @return Resource