anchor.diff:      ErrorForbidden = rest_test_utils:get_rest_error(?ERROR_FORBIDDEN),
   
       try
  -        initializer:testmaster_mock_space_user_privileges([Worker], SpaceId, User, SpacePrivs),
  -        {ok, Code1, _, Resp1} = rest_test_utils:request(Worker, URL, delete, Headers, []),
  -        ?assertMatch(ErrorForbidden, {Code1, json_utils:decode(Resp1)}),
  +        lists:foreach(fun
  +        (PrivsToAdd) when PrivsToAdd =:= RequiredPrivs ->
  +            % success will be checked later
  +            ok;
  +        (PrivsToAdd) ->
  +            initializer:testmaster_mock_space_user_privileges([Worker], SpaceId, User, SpacePrivs ++ PrivsToAdd),
  +            {ok, Code, _, Resp} = rest_test_utils:request(Worker, URL, delete, Headers, []),
  +            ?assertMatch(ErrorForbidden, {Code, json_utils:decode(Resp)})
  +        end, combinations(RequiredPrivs)),
   
           initializer:testmaster_mock_space_user_privileges([Worker], SpaceId, User, SpacePrivs ++ RequiredPrivs),
           case rest_test_utils:request(Worker, URL, delete, Headers, []) of
  
positive.code:                 RequiredPrivs = case TransferType of
                      replication -> [?SPACE_CANCEL_REPLICATION];
                      eviction -> [?SPACE_CANCEL_EVICTION];
                      migration -> [?SPACE_CANCEL_REPLICATION, ?SPACE_CANCEL_EVICTION]
                  end,
                  SpacePrivs = AllSpacePrivs -- RequiredPrivs,
                  ErrorForbidden = rest_test_utils:get_rest_error(?ERROR_FORBIDDEN),
  
                  initializer:testmaster_mock_space_user_privileges([Worker], SpaceId, CancelingUser, SpacePrivs),
                  {ok, Code1, _, Resp1} = rest_test_utils:request(Worker, HTTPPath, delete, Headers, []),
                  ?assertMatch(ErrorForbidden, {Code1, json_utils:decode(Resp1)}),
  
                  initializer:testmaster_mock_space_user_privileges([Worker], SpaceId, CancelingUser, SpacePrivs ++ RequiredPrivs),
                  ?assertMatch(
  
negative.code:     float_to_binary(Val);
  binary_from_term(Val) when is_atom(Val) ->
      atom_to_binary(Val, utf8).
  
  
  combinations([]) ->
      [[]];
  combinations([Item]) ->
      [[Item], []];
  combinations([Item | Items]) ->
      ItemsCombinations = combinations(Items),
      ItemsCombinations ++ lists:map(fun(Comb) ->
          lists:sort([Item | Comb])
      end, ItemsCombinations).
  