anchor.diff:  %%%===================================================================
   
   
  --define(SET_XATTRS_DATA_SPEC, #data_spec{
  -    required = [<<"metadata">>],
  -    correct_values = #{<<"metadata">> => [
  -        % Tests setting multiple xattrs at once
  -        #{?XATTR_1_KEY => ?XATTR_1_VALUE, ?XATTR_2_KEY => ?XATTR_2_VALUE},
  -        % Tests setting xattr internal types
  -        #{?ACL_KEY => ?ACL_3},
  -        #{?MIMETYPE_KEY => ?MIMETYPE_1},
  -        #{?TRANSFER_ENCODING_KEY => ?TRANSFER_ENCODING_1},
  -        #{?CDMI_COMPLETION_STATUS_KEY => ?CDMI_COMPLETION_STATUS_1},
  -        #{?JSON_METADATA_KEY => ?JSON_METADATA_4},
  -        #{?RDF_METADATA_KEY => ?RDF_METADATA_1}
  -    ]}
  -}).
  -
  -
   set_file_xattrs_test(Config) ->
       [P2, P1] = Providers = ?config(op_worker_nodes, Config),
       {FileType, FilePath, FileGuid, _} = create_random_file(P1, P2, ?SPACE_2, false, Config),
   
  +    DataSpec = #data_spec{
  +        required = [<<"metadata">>],
  +        correct_values = #{<<"metadata">> => [
  +            % Tests setting multiple xattrs at once
  +            #{?XATTR_1_KEY => ?XATTR_1_VALUE, ?XATTR_2_KEY => ?XATTR_2_VALUE},
  +            % Tests setting xattr internal types
  +            #{?ACL_KEY => ?ACL_3},
  +            #{?MIMETYPE_KEY => ?MIMETYPE_1},
  +            #{?TRANSFER_ENCODING_KEY => ?TRANSFER_ENCODING_1},
  +            #{?CDMI_COMPLETION_STATUS_KEY => ?CDMI_COMPLETION_STATUS_1},
  +            #{?JSON_METADATA_KEY => ?JSON_METADATA_4},
  +            #{?RDF_METADATA_KEY => ?RDF_METADATA_1}
  +        ]},
  +        bad_values = [
  +            {<<"metadata">>, <<"aaa">>, ?ERROR_BAD_VALUE_JSON(<<"metadata">>)},
  +            % Keys with prefixes `cdmi_` and `onedata_` are forbidden with exception
  +            % for those listed in above correct_values
  +            {<<"metadata">>, #{<<"cdmi_attr">> => <<"val">>}, ?ERROR_POSIX(?EPERM)},
  +            {<<"metadata">>, #{<<"onedata_attr">> => <<"val">>}, ?ERROR_POSIX(?EPERM)}
  +        ]
  +    },
       GetExpCallResultFun = fun(#api_test_ctx{client = Client, data = #{<<"metadata">> := Xattrs}}) ->
           case {Client, maps:is_key(?ACL_KEY, Xattrs)} of
               {?USER_IN_SPACE_2_AUTH, true} ->
  
positive.code:         VerifyEnvFun,
          Providers,
          ?CLIENT_SPEC_FOR_SHARE_SCENARIOS(Config),
          ?SET_XATTRS_DATA_SPEC,
          _QsParams = [],
          Config
      ).
  
negative.code: 
  
  %% @private
  assert_no_xattrs_set(Node, FileGuid, Config) ->
      ?assertMatch(
          {ok, []},
          lfm_proxy:list_xattr(Node, ?USER_IN_BOTH_SPACES_SESS_ID(Node, Config), {guid, FileGuid}, false, true)
      ).
  
  
  %% @private
  