anchor.diff:      test_node_starter:clean_environment(Config).
   
   init_per_testcase(_, Config) ->
  -    application:start(ssl2),
  +    ssl:start(),
       Config.
   
   end_per_testcase(_, _Config) ->
  -    application:stop(ssl2).
  +    ssl:stop().
   
   %%%===================================================================
   %%% Internal functions
  
positive.code:                     Body, [SSLOpts, insecure | Options]);
              % @todo for now, in rest we only use the root macaroon
              ({_, {Macaroon, []}}, URN, Method, Headers, Body, Options) ->
                  AuthHdr =
                      http_client:request(Method, Url ++ URN, [
                          {<<"content-type">>, <<"application/json">>},
                          {<<"macaroon">>, Macaroon} | Headers
                      ], Body, [SSLOpts, insecure | Options])
          end
      ).
  
  
negative.code: %%%===================================================================
  
  token_authentication(Config) ->
      % given
      [Worker1, _] = ?config(op_worker_nodes, Config),
      mock_gr_certificates(Config),
      SessionId = <<"SessionId">>,
  
      % when
      {ok, Sock} = connect_via_token(Worker1, ?MACAROON, SessionId),
  
      % then
      ?assertMatch(
          {ok, #document{value = #onedata_user{name = ?USER_NAME}}},
          rpc:call(Worker1, onedata_user, get, [?USER_ID])
      ),
      ?assertMatch(
          {ok, #document{value = #session{identity = #identity{user_id = ?USER_ID}}}},
          rpc:call(Worker1, session, get, [SessionId])
      ),
      ?assertMatch(
          {ok, #document{value = #identity{user_id = ?USER_ID}}},
          rpc:call(Worker1, identity, get, [#auth{macaroon = ?MACAROON}])
      ),
      unmock_gr_certificates(Config),
      ok = ssl:close(Sock).
  
  %%%===================================================================
  %%% SetUp and TearDown functions
  %%%===================================================================
  