anchor.diff:              ]
           ) ->
               case Headers of
  -                ExpectedMacaroonHeaders -> ok;
  -                ExpectedBasicAuthHeaders -> ok
  -            end
  -    end),
  -    ?assertEqual(ok, oz_endpoint:provider_request(
  -        {user, token, {?MACAROON, ?DISCH_MACAROONS}}, "/URN", method,
  +                ExpectedTokenHeaders -> ok;
  +                ExpectedMacaroonHeaders -> ok;
  +                ExpectedBasicAuthHeaders -> ok
  +            end
  +    end),
  +    ?assertEqual(ok, oz_endpoint:provider_request(
  +        {user, token, token()}, "/URN", method,
  +        #{<<"hdr">> => <<"abcdf">>}, body, [options])),
  +    ?assertEqual(ok, oz_endpoint:provider_request(
  +        {user, macaroon, {macaroon(), disch_macaroons()}}, "/URN", method,
           #{<<"hdr">> => <<"abcdf">>}, body, [options])),
       ?assertEqual(ok, oz_endpoint:provider_request(
           {user, basic, ?BASIC_AUTH_HEADER}, "/URN", method,
  
positive.code: 
  -include_lib("eunit/include/eunit.hrl").
  
  % Root macaroon
  -define(MACAROON, macaroon:create("Location", "Key", "Macaroon")).
  % Request header with root macaroon
  macaroon_header() ->
      {ok, Bin} = token_utils:serialize62(?MACAROON),
      #{<<"macaroon">> => Bin}.
  
  % List of disch macaroons
  -define(DISCH_MACAROONS, [
      macaroon:create("Location", "Key1", "Discharge macaroon 1"),
      macaroon:create("Location", "Key2", "Discharge macaroon 2"),
      macaroon:create("Location", "Key3", "Discharge macaroon 3")
  ]).
  % Bound disch macaroons joined into one string with spaces for request header.
  disch_macaroons_header() ->
      Macaroon = ?MACAROON,
      BoundMacaroons = lists:map(fun(DM) ->
          BDM = macaroon:prepare_for_request(Macaroon, DM),
          {ok, Bin} = token_utils:serialize62(BDM),
          Bin
      end, ?DISCH_MACAROONS),
      #{<<"discharge-macaroons">> => str_utils:join_binary(BoundMacaroons, <<" ">>)}.
  
  -define(CONTENT_TYPE_HEADER,
      #{<<"content-type">> => <<"application/json">>}
  
negative.code: 
  
  should_send_user_request_1() ->
      TokenHeader = token_header(),
      MacaroonHeader = macaroon_header(),
      DischMacaroonsHeader = disch_macaroons_header(),
      BasicAuthHeader = basic_auth_header(),
  
      ExpectedTokenHeaders = merge_headers([
          ?CONTENT_TYPE_HEADER, TokenHeader
      ]),
      ExpectedMacaroonHeaders = merge_headers([
          ?CONTENT_TYPE_HEADER, MacaroonHeader, DischMacaroonsHeader
      ]),
  