anchor.diff:      % given
       Workers = [Worker | _] = ?config(op_worker_nodes, Config),
       Endpoint = rest_endpoint(Worker),
  -    test_utils:mock_expect(Workers, rest_handler, is_authorized, fun test_throw_400_with_description/2),
  -
  -    % when
  -    {ok, Status, _, Body} = do_request(get, Endpoint ++ "random_path"),
  +    test_utils:mock_expect(Workers, files, is_authorized, fun test_throw_400_with_description/2),
  +
  +    % when
  +    {ok, Status, _, Body} = do_request(get, Endpoint ++ "files"),
   
       % then
       ?assertEqual(400, Status),
  
positive.code:     Endpoint = rest_endpoint(Worker),
  
      % when
      AuthFail = do_request(get, Endpoint ++ "random_path", [{<<"X-Auth-Token">>, <<"invalid">>}]),
      AuthSuccess1 = do_request(get, Endpoint ++ "random_path", [{<<"X-Auth-Token">>, ?MACAROON}]),
      AuthSuccess2 = do_request(get, Endpoint ++ "random_path", [{<<"Macaroon">>, ?MACAROON}]),
  
      % then
      ?assertMatch({ok, 401, _, _}, AuthFail),
      ?assertMatch({ok, 404, _, _}, AuthSuccess1),
      ?assertMatch({ok, 404, _, _}, AuthSuccess2).
  
  cert_auth(Config) ->
      % given
  
negative.code:     % given
      Workers = [Worker | _] = ?config(op_worker_nodes, Config),
      Endpoint = rest_endpoint(Worker),
      test_utils:mock_expect(Workers, files, is_authorized, fun test_crash/2),
  
      % when
      {ok, Status, _, _} = do_request(get, Endpoint ++ "files"),
  
      % then
      ?assertEqual(500, Status).
  