anchor.diff:  -include_lib("ctool/include/test/performance.hrl").
   -include_lib("clproto/include/messages.hrl").
   
  --export([connect_via_macaroon/1, connect_via_macaroon/2, connect_via_macaroon/3]).
  +-export([
  +    connect_via_macaroon/1, connect_via_macaroon/2,
  +    connect_via_macaroon/3, connect_via_macaroon/4
  +]).
   -export([receive_server_message/0, receive_server_message/1]).
   -export([generate_delete_file_message/2, generate_open_file_message/2, generate_get_children_message/2, 
       generate_fsync_message/2, generate_create_message/3]).
   
  +-export([
  +    open/2, open/3, open/4,
  +    proxy_read/5, proxy_read/6,
  +    proxy_write/5, proxy_write/6
  +]).
  +
  +-define(MSG_ID, integer_to_binary(erlang:unique_integer([positive, monotonic]))).
  +-define(IRRELEVANT_FIELD_VALUE, <<"needless">>).
   
   %% ====================================================================
   %% API
  
positive.code: -author("Michal Stanisz").
  
  -include("fuse_utils.hrl").
  -include("global_definitions.hrl").
  -include("proto/oneclient/message_id.hrl").
  -include("proto/oneclient/common_messages.hrl").
  
negative.code: 
  %%--------------------------------------------------------------------
  %% @doc
  %% Connect to given node using macaroon, with custom socket opts
  %% @equiv connect_via_macaroon(Node, SocketOpts, crypto:strong_rand_bytes(10))
  %% @end
  %%--------------------------------------------------------------------
  connect_via_macaroon(Node, SocketOpts, SessionId) ->
      connect_via_macaroon(Node, SocketOpts, SessionId, #macaroon_auth{
          macaroon = ?MACAROON,
          disch_macaroons = ?DISCH_MACAROONS
      }).
  
  %%--------------------------------------------------------------------
  %% @doc
  %% Connect to given node using a macaroon, with custom socket opts and session id.
  %% @end
  %%--------------------------------------------------------------------
  -spec connect_via_macaroon(Node :: node(), SocketOpts :: list(), session:id(), #macaroon_auth{}) ->
      {ok, {Sock :: term(), SessId :: session:id()}}.
  connect_via_macaroon(Node, SocketOpts, SessId, #macaroon_auth{
      macaroon = Macaroon,
      disch_macaroons = DischMacaroons}
  ) ->
      % given
      {ok, [Version | _]} = rpc:call(
          Node, application, get_env, [?APP_NAME, compatible_oc_versions]
  