anchor.diff:                      remove_xattrs(TestNode, Providers, FileGuid, Xattrs, Config)
               end,
               true
  -    end.
  +    end,
  +
  +    set_metadata_test_base(
  +        <<"xattrs">>,
  +        FileType, FilePath, FileGuid, undefined,
  +        create_validate_set_metadata_rest_call_fun(GetExpCallResultFun),
  +        create_validate_set_metadata_gs_call_fun(GetExpCallResultFun),
  +        VerifyEnvFun,
  +        Providers,
  +        ?CLIENT_SPEC_FOR_SPACE_2_SCENARIOS(Config),
  +        ?SET_XATTRS_DATA_SPEC,
  +        _QsParams = [],
  +        Config
  +    ).
  +
  +
  +set_shared_file_xattrs_test(Config) ->
  +    [P2, P1] = Providers = ?config(op_worker_nodes, Config),
  +    {FileType, FilePath, FileGuid, ShareId} = create_random_file(P1, P2, ?SPACE_2, true, Config),
  +
  +    GetExpCallResultFun = fun(_TestCtx) -> ?ERROR_NOT_SUPPORTED end,
  +
  +    VerifyEnvFun = fun(_, #api_test_ctx{node = TestNode, data = #{<<"metadata">> := Xattrs}}) ->
  +        assert_no_xattrs_set(TestNode, FileGuid, Xattrs, Config),
  +        true
  +    end,
  +
  +    set_metadata_test_base(
  +        <<"xattrs">>,
  +        FileType, FilePath, FileGuid, ShareId,
  +        create_validate_set_metadata_rest_call_fun(GetExpCallResultFun),
  +        create_validate_set_metadata_gs_call_fun(GetExpCallResultFun),
  +        VerifyEnvFun,
  +        Providers,
  +        ?CLIENT_SPEC_FOR_SHARE_SCENARIOS(Config),
  +        ?SET_XATTRS_DATA_SPEC,
  +        _QsParams = [],
  +        Config
  +    ).
  +
  +
  +set_file_xattrs_on_provider_not_supporting_space_test(Config) ->
  +    [P2, P1] = ?config(op_worker_nodes, Config),
  +    {FileType, FilePath, FileGuid, _} = create_random_file(P1, P1, ?SPACE_1, false, Config),
  +
  +    GetExpCallResultFun = fun(_TestCtx) -> ?ERROR_USER_NOT_SUPPORTED end,
  +
  +    DataSpec = #data_spec{
  +        required = [<<"metadata">>],
  +        correct_values = #{<<"metadata">> => [#{?XATTR_1_KEY => ?XATTR_1_VALUE}]}
  +    },
  +    VerifyEnvFun = fun(_, #api_test_ctx{node = TestNode}) ->
  +        ?assertMatch({error, ?ENODATA}, get_xattr(TestNode, FileGuid, ?XATTR_1_KEY, Config), ?ATTEMPTS),
  +        true
  +    end,
  +
  +    set_metadata_test_base(
  +        <<"xattrs">>,
  +        FileType, FilePath, FileGuid, undefined,
  +        create_validate_set_metadata_rest_call_fun(GetExpCallResultFun, P2),
  +        create_validate_set_metadata_gs_call_fun(GetExpCallResultFun, P2),
  +        VerifyEnvFun,
  +        [P2],
  +        ?CLIENT_SPEC_FOR_SPACE_1_SCENARIOS(Config),
  +        DataSpec,
  +        _QsParams = [],
  +        Config
  +    ).
   
   
   %% @private
  
positive.code: 
  set_shared_file_json_metadata_test(Config) ->
      [P2, P1] = Providers = ?config(op_worker_nodes, Config),
      SessIdP1 = ?USER_IN_BOTH_SPACES_SESS_ID(P1, Config),
      SessIdP2 = ?USER_IN_BOTH_SPACES_SESS_ID(P2, Config),
  
      FileType = api_test_utils:randomly_choose_file_type_for_test(),
      FilePath = filename:join(["/", ?SPACE_2, ?RANDOM_FILE_NAME()]),
      {ok, FileGuid} = api_test_utils:create_file(FileType, P1, SessIdP1, FilePath),
      {ok, ShareId} = lfm_proxy:create_share(P1, SessIdP1, {guid, FileGuid}, <<"share">>),
      api_test_utils:wait_for_file_sync(P2, SessIdP2, FileGuid),
  
      GetExpCallResultFun = fun(_TestCtx) -> ?ERROR_NOT_SUPPORTED end,
      VerifyEnvFun = fun(_, #api_test_ctx{node = TestNode}) ->
          ?assertMatch({error, ?ENODATA}, get_json(TestNode, FileGuid, Config), ?ATTEMPTS),
          true
      end,
      DataSpec = #data_spec{
          required = [<<"metadata">>],
          correct_values = #{<<"metadata">> => [?JSON_METADATA_1]}
      },
  
      set_metadata_test_base(
          <<"json">>,
  
negative.code:         required = [<<"metadata">>],
          correct_values = #{<<"metadata">> => [?RDF_METADATA_1, ?RDF_METADATA_2]}
      },
      VerifyEnvFun = fun
          (expected_failure, #api_test_ctx{node = TestNode}) ->
              ?assertMatch({error, ?ENODATA}, get_rdf(TestNode, FileGuid, Config), ?ATTEMPTS),
              true;
          (expected_success, #api_test_ctx{node = TestNode, data = #{<<"metadata">> := Metadata}}) ->
  