anchor.diff:          do_request(
               RestAddress ++ "/groups/" ++ binary_to_list(GID)++ "/spaces", Headers, get, [], Options
           ),
  -%%     TODO usunac printa
  -    ct:pal("DEBUG: ~p~n", [Response]),
       [Spaces] = get_body_val([spaces], Response),
       Spaces.
   
  
positive.code:     set_space_privileges(users, SID, UserId, [space_view_data], ReqParams).
  
  
  check_bad_requests([Endpoint], Body, ReqParams)->
      {RestAddress, Headers, Options} = ReqParams,
      Resp = do_request(RestAddress ++ Endpoint, Headers, get, Body, Options),
      ct:pal("DEBUG: ~p~n", [Resp]),
      ?assertMatch(bad, check_status(Resp));
  check_bad_requests([Endpoint | Endpoints], Body, ReqParams)->
      {RestAddress, Headers, Options} = ReqParams,
      Resp = do_request(RestAddress ++ Endpoint, Headers, get, Body, Options),
      ct:pal("DEBUG: ~p~n", [Resp]),
      ?assertMatch(bad, check_status(Resp)),
      check_bad_requests(Endpoints, get, Body, ReqParams).
      
negative.code:         {wrong_body,"WRONG BODY"}
      ]}),
  
      Endpoints1 =
      [
          %% 0 is used wherever id is needed as a parameter in below endpoints
          %% below endpoints will be tested with get method
          "/provider", "/provider/spaces", "/provider/spaces/0", "/groups/0", "/groups/0/users",
          "/groups/0/users/token", "/groups/0/users/0", "/groups/0/users/0/privileges",
          "/groups/0/spaces", "/groups/0/spaces/token", "/groups/0/spaces/0", "/user", "/user/spaces",
          "/user/spaces/default", "/user/spaces/token", "/user/spaces/0", "/user/groups",
          "/user/groups/join", "/user/groups/0", "/user/merge/token", "/spaces/0", "/spaces/0/users",
          "/spaces/0/users/token", "/spaces/0/users/0", "/spaces/0/users/0/privileges",
          "/spaces/0/groups", "/spaces/0/groups/token", "/spaces/0/groups/0",
          "/spaces/0/groups/0/privileges", "/spaces/0/providers", "/spaces/0/providers/token",
          "/spaces/0/providers/0"
      ],
      check_bad_requests(Endpoints1, get, Body, UserReqParams ),
  
      Endpoints2=
      [
          %% 0 is used wherever id is needed as a parameter in below endpoints
          %% below endpoints will be tested with put method
          "/provider/0", "/provider/spaces/support", "/provider/test/check_my_ports", "/groups",
          "/groups/0/spaces/join", "/user/authorize", "/user/spaces/join", "/user/merge", "/spaces"
      ],
      check_bad_requests(Endpoints2, post, Body, UserReqParams).
  
  %%%===================================================================
  %%% Setup/teardown functions
  