anchor.diff:              RestAddress ++ "/groups/" ++ binary_to_list(GID) ++ "/users/" ++ binary_to_list(UID),
               Headers, get, [], Options
           ),
  -    %% TODO remove below line after tests
  -    ?PRINT(Response),
       get_body_val([userId, name], Response).
   
   delete_group_user(GID, UID, ReqParams) ->
  
positive.code:     [
          {group, provider_rest_module_test_group},
          {group, user_rest_module_test_group},
          {group, group_rest_module_test_group}
  %%         ,
  %%         {group, spaces_rest_module_test_group}
  
      ].
  
  groups() ->
  
negative.code: 
  %% spaces_rest_module_test_group =======================================
  
  spaces_crud_by_user_test(Config) ->
      RestAddress = ?config(restAddress, Config),
      [Node] = ?config(gr_nodes, Config),
      ReqParams = {RestAddress, ?CONTENT_TYPE_HEADER, []},
  
      {ProviderId, ProviderReqParams} =
          register_provider(?URLS1, ?REDIRECTION_POINT1, ?CLIENT_NAME1, Config, ReqParams),
  
      %% create user
      UserId = create_user(?USER_NAME1, Node),
  
      %% authenticate user
      NewHeaders = auth_user(UserId, ProviderId, ReqParams, Node),
      UserReqParams = update_req_params(ProviderReqParams, NewHeaders, headers),
  
      SID = create_space(?SPACE_NAME1, UserReqParams),
  
      ?assertMatch([SID, ?SPACE_NAME1],read_space(SID, UserReqParams)),
  
      ?assertMatch(ok, check_status(update_space(?SPACE_NAME2, SID, UserReqParams))),
  
      ?assertMatch([SID, ?SPACE_NAME2], read_space(SID, UserReqParams)),
  
      ?assertMatch(ok, check_status(delete_space(SID, UserReqParams))).
  
  spaces_crud_by_provider_test(Config) ->
      RestAddress = ?config(restAddress, Config),
      [Node] = ?config(gr_nodes, Config),
      ReqParams = {RestAddress, ?CONTENT_TYPE_HEADER, []},
  
      {ProviderId, ProviderReqParams} =
          register_provider(?URLS1, ?REDIRECTION_POINT1, ?CLIENT_NAME1, Config, ReqParams),
  
      %% create user
      UserId = create_user(?USER_NAME1, Node),
  
      %% authenticate user
      NewHeaders = auth_user(UserId, ProviderId, ReqParams, Node),
      UserReqParams = update_req_params(ProviderReqParams, NewHeaders, headers),
  
      Token = get_space_creation_token_for_user(UserReqParams),
  
      ?PRINT(Token),
  
      SID = create_space(Token, ?SPACE_NAME1, ?SPACE_SIZE1, ProviderReqParams),
  
      ?PRINT(SID),
  
      ?assertMatch([SID, ?SPACE_NAME1],read_space(SID, ProviderReqParams)),
  
      ?assertMatch(ok, check_status(delete_space(SID, UserReqParams))).
  
  spaces_user_test(Config) ->
  
      RestAddress = ?config(restAddress, Config),
      [Node] = ?config(gr_nodes, Config),
      ReqParams = {RestAddress, ?CONTENT_TYPE_HEADER, []},
  
      {ProviderId, ProviderReqParams} =
          register_provider(?URLS1, ?REDIRECTION_POINT1, ?CLIENT_NAME1, Config, ReqParams),
  
      %% create users
      UserId1 = create_user(?USER_NAME1, Node),
      UserId2 = create_user(?USER_NAME2, Node),
  
      %% authenticate users
      NewHeaders1 = auth_user(UserId1, ProviderId, ReqParams, Node),
      NewHeaders2 = auth_user(UserId2, ProviderId, ReqParams, Node),
      UserReqParams1 = update_req_params(ProviderReqParams, NewHeaders1, headers),
      UserReqParams2 = update_req_params(ProviderReqParams, NewHeaders2, headers),
  
      SID = create_space(?SPACE_NAME1, UserReqParams1),
  
      InvitationToken = get_space_invitation_token(users, SID, UserReqParams1),
  
      ?assertMatch(SID, join_user_to_space(InvitationToken, UserReqParams2)),
  
      ?assertMatch(
          true,
          is_included([UserId1, UserId2], get_space_users(SID, UserReqParams1))
      ),
      ?assertMatch(
          [UserId2, ?USER_NAME2],
          get_space_user(SID, UserId2, UserReqParams2)
      ),
  
      ?assertMatch(
          ok,
          check_status(delete_space_user(SID, UserId2, UserReqParams1))
      ),
  
      ?assertMatch(
          false,
          is_included([UserId2], get_space_users(SID, UserReqParams1))
      ).
  
  spaces_group_test(Config) ->
      RestAddress = ?config(restAddress, Config),
      [Node] = ?config(gr_nodes, Config),
      ReqParams = {RestAddress, ?CONTENT_TYPE_HEADER, []},
  
      {ProviderId, ProviderReqParams} =
          register_provider(?URLS1, ?REDIRECTION_POINT1, ?CLIENT_NAME1, Config, ReqParams),
  
      %% create users
      UserId = create_user(?USER_NAME1, Node),
  
      %% authenticate users
      NewHeaders = auth_user(UserId, ProviderId, ReqParams, Node),
      UserReqParams = update_req_params(ProviderReqParams, NewHeaders, headers),
  
      GID1 = create_group(?GROUP_NAME1, UserReqParams),
  
      GID2 = create_group(?GROUP_NAME2, UserReqParams),
  
      SID = create_space_for_group(?SPACE_NAME1, GID1, UserReqParams),
  
      InvitationToken = get_space_invitation_token(groups, SID, UserReqParams),
  
      ?assertMatch(
          SID,
          join_group_to_space(InvitationToken, GID2, UserReqParams)
      ),
  
      ?assertMatch(
          true,
          is_included([GID1, GID2], get_space_groups(SID, UserReqParams))
      ),
  
      ?assertMatch(
          [GID2, ?GROUP_NAME2],
          get_space_group(SID, GID2, UserReqParams)
      ),
  
      ?assertMatch(
          ok,
          check_status(delete_space_group(SID, GID1, UserReqParams))
      ),
  
      ?assertMatch(
          false,
          is_included([GID1], get_space_groups(SID, UserReqParams))
      ).
  
  spaces_provider_test(Config) ->
   RestAddress = ?config(restAddress, Config),
      [Node] = ?config(gr_nodes, Config),
      ReqParams = {RestAddress, ?CONTENT_TYPE_HEADER, []},
  
      {ProviderId, ProviderReqParams} =
          register_provider(?URLS1, ?REDIRECTION_POINT1, ?CLIENT_NAME1, Config, ReqParams),
  
      %% create users
      UserId = create_user(?USER_NAME1, Node),
  
      %%  authenticate users
      NewHeaders = auth_user(UserId, ProviderId, ReqParams, Node),
      UserReqParams = update_req_params(ProviderReqParams, NewHeaders, headers),
      Token = get_space_creation_token_for_user(UserReqParams),
      SID = create_space_for_provider(Token, ?SPACE_NAME1, ?SPACE_SIZE1, ProviderReqParams),
  
      ?assertMatch(
          [ProviderId],
          get_space_providers(SID, UserReqParams)
      ),
  
      ?assertMatch(
          [?CLIENT_NAME1, ProviderId, ?URLS1, ?REDIRECTION_POINT1],
          get_space_provider(SID, ProviderId, UserReqParams)
      ),
  
      ?assertMatch(
          ok,
          check_status(delete_space_provider(SID, PID, ReqParams))
      ),
  
      ?assertMatch(
          [],
          get_space_providers(SID, UserReqParams)
      ).
  
  %%
  %%
  %%
  
  %%
  %%%===================================================================
  %%% Setup/teardown functions
  %%%===================================================================
  