anchor.diff:      User2ParamsOtherAddress = update_req_params(User2ReqParams2, OtherRestAddress, address),
   
       %% check if space is in list of user2 space
  -    ?assertMatch([[SID1], <<"undefined">>], get_user_spaces(User2ReqParams2)),
  -    ?assertMatch([[SID1], <<"undefined">>], get_user_spaces(User2ParamsOtherAddress)),
  +    [User2Spaces, _] = get_user_spaces(User2ReqParams2),
  +    ?assert(lists:member(SID1, User2Spaces)),
  +    ?assertMatch([User2Spaces, _], get_user_spaces(User2ParamsOtherAddress)),
   
       %% check if user2 is in list of space's users
       ?assertMatch(true, is_included([UserId2], get_space_users(SID1, User2ReqParams2))),
  
positive.code:     User1ParamsOtherAddress = update_req_params(User1ReqParams, OtherRestAddress, address),
  
      {_UserId2, User2ReqParams} = register_user(?USER_NAME2, ProviderId, Config, ProviderReqParams),
      SID1 = create_space_for_user(?SPACE_NAME1, User1ParamsOtherAddress),
      InvitationToken = get_space_invitation_token(users, SID1, User1ReqParams),
  
      join_user_to_space(InvitationToken, User2ReqParams),
  
      User2ParamsOtherAddress = update_req_params(User2ReqParams, OtherRestAddress, address),
      ?assertMatch(ok, check_status(user_leaves_space(SID1, User2ReqParams))),
      ?assertMatch([[SID1], <<"undefined">>], get_user_spaces(User1ReqParams)),
      ?assertMatch([[SID1], <<"undefined">>], get_user_spaces(User1ParamsOtherAddress)),
      ?assertMatch([[], <<"undefined">>], get_user_spaces(User2ReqParams)),
      ?assertMatch([[], <<"undefined">>], get_user_spaces(User2ParamsOtherAddress)).
  
  invite_user_to_space_test(Config) ->
      ProviderId = ?config(providerId, Config),
  
negative.code:     SID1 = create_space_for_user(?SPACE_NAME1, UserReqParams),
      SID2 = <<"0">>,
  
      [UserSpaces, DefaultSpace] = get_user_spaces(UserReqParams),
      ?assert(lists:member(SID1, UserSpaces)),
      ?assertMatch([UserSpaces, DefaultSpace], get_user_spaces(ParamsWithOtherAddress)),
      ?assertMatch({bad_response_code, _}, check_status(set_default_space_for_user(SID2, UserReqParams))),
      ?assertMatch([UserSpaces, DefaultSpace], get_user_spaces(UserReqParams)),
      ?assertMatch([UserSpaces, DefaultSpace], get_user_spaces(ParamsWithOtherAddress)).
  
  user_gets_space_info_test(Config) ->
      UserReqParams = ?config(userReqParams, Config),
  