anchor.diff:      RtransferOpts2 = [ReadFunOpt, WriteFunOpt, get_binding(Worker2) | ?DEFAULT_RTRANSFER_OPTS],
   
       %% when
  -    ?assertMatch({ok, _}, start_rtransfer(Worker1, RtransferOpts1)),
  -    ?assertMatch({ok, _}, start_rtransfer(Worker2, RtransferOpts2)),
  -
  -    Ref1 = prepare_fetch_request(
  -        Worker1, Worker2, ?TEST_FILE_UUID, ?TEST_OFFSET, DataSize
  -    ),
  -
  -    fetch_data(Worker1, Ref1, notify_fun(CounterPid), on_complete_fun(self())),
  +    prepare_rtransfer({Worker1, RtransferOpts1}, {Worker2, RtransferOpts2},
  +        ?TEST_FILE_UUID, ?TEST_OFFSET, DataSize,
  +        notify_fun(CounterPid), on_complete_fun(self())
  +    ),
   
       %% then
       ?assertReceivedMatch({on_complete, {ok, DataSize}}, ?TIMEOUT),
  
positive.code:     start_rtransfer(Worker1, [[get_binding(Worker1) | RtransferOpts1]]),
      start_rtransfer(Worker2, [[get_binding(Worker2) | RtransferOpts2]]),
      Ref1 = prepare_fetch_request(
          Worker1, Worker2, ?TEST_FILE_UUID, ?TEST_OFFSET, DataSize
      ),
      fetch_data(Worker1, Ref1, notify_fun(), on_complete_fun(self())),
  
      %% then
      ?assertReceivedMatch({on_complete, {error,{storage,_}}}, ?TIMEOUT).
  
  error_write_fun_test(Config) ->
      %% test with write_fun callback returning an error
      [Worker1, Worker2 | _] = ?config(op_worker_nodes, Config),
  
      %% given
      DataSize = ?TEST_BLOCK_SIZE,
      Data = generate_binary(DataSize),
      WriteFunOpt = make_opt_fun(write_fun, {error, ?FILE_HANDLE2, test_error}),
      ReadFunOpt = make_opt_fun(read_fun, {ok, ?FILE_HANDLE2, Data}),
      RtransferOpts1 = [ReadFunOpt, WriteFunOpt, get_binding(Worker1) | ?DEFAULT_RTRANSFER_OPTS],
      RtransferOpts2 = [ReadFunOpt, WriteFunOpt, get_binding(Worker2) | ?DEFAULT_RTRANSFER_OPTS],
  
      %% when
      start_rtransfer(Worker1, [[get_binding(Worker1) | RtransferOpts1]]),
      start_rtransfer(Worker2, [[get_binding(Worker2) | RtransferOpts2]]),
      Ref1 = prepare_fetch_request(
          Worker1, Worker2, ?TEST_FILE_UUID, ?TEST_OFFSET, DataSize
      ),
      fetch_data(Worker1, Ref1, notify_fun(), on_complete_fun(self())),
  
      %% then
      ?assertReceivedMatch({on_complete, {error,{storage,_}}}, ?TIMEOUT).
  
  bad_formatted_request_test(Config) ->
      %% test calling fetch with bad _request
      [Worker1, Worker2 | _] = ?config(op_worker_nodes, Config),
  
      %% given
      DataSize = ?TEST_BLOCK_SIZE,
      Data = generate_binary(DataSize),
      WriteFunOpt = make_opt_fun(write_fun, {ok, ?FILE_HANDLE2, DataSize}),
      ReadFunOpt = make_opt_fun(read_fun, {ok, ?FILE_HANDLE2, Data}),
      RtransferOpts1 = [ReadFunOpt, WriteFunOpt, get_binding(Worker1) | ?DEFAULT_RTRANSFER_OPTS],
      RtransferOpts2 = [ReadFunOpt, WriteFunOpt, get_binding(Worker2) | ?DEFAULT_RTRANSFER_OPTS],
  
      %% when
      ?assertMatch({ok, _}, start_rtransfer(Worker1, RtransferOpts1)),
      ?assertMatch({ok, _}, start_rtransfer(Worker2, RtransferOpts2)),
      fetch_data(Worker1, {bad_request}, notify_fun(), on_complete_fun(self())),
  
      %% then
      ?assertReceivedMatch({on_complete, {error, _}}, ?TIMEOUT).
  
  bad_file_offset_test(Config) ->
      %% test calling fetch with file offset greater than file size
      [Worker1, Worker2 | _] = ?config(op_worker_nodes, Config),
  
      %% given
      DataSize = ?TEST_BLOCK_SIZE,
      %% offset is bigger than DataSize
      Offset = DataSize + 10,
      Data = generate_binary(DataSize),
      WriteFunOpt = make_opt_fun(write_fun, {ok, ?FILE_HANDLE2, DataSize}),
      ReadFunOpt = make_opt_fun(read_fun, {ok, ?FILE_HANDLE2, Data}),
      RtransferOpts1 = [ReadFunOpt, WriteFunOpt, get_binding(Worker1) | ?DEFAULT_RTRANSFER_OPTS],
      RtransferOpts2 = [ReadFunOpt, WriteFunOpt, get_binding(Worker2) | ?DEFAULT_RTRANSFER_OPTS],
  
      %% when
      ?assertMatch({ok, _}, start_rtransfer(Worker1, RtransferOpts1)),
      ?assertMatch({ok, _}, start_rtransfer(Worker2, RtransferOpts2)),
      Ref1 = prepare_fetch_request(Worker1, Worker2, ?TEST_FILE_UUID, Offset, DataSize),
      fetch_data(Worker1, Ref1, notify_fun(), on_complete_fun(self())),
  
      %% then
  
negative.code:     DataSize = ?TEST_BLOCK_SIZE,
      WriteFunOpt = make_opt_fun(write_fun, {ok, ?FILE_HANDLE2, DataSize}),
      ReadFunOpt = make_opt_fun(read_fun, {error, ?FILE_HANDLE2, test_error}),
      RtransferOpts1 = [ReadFunOpt, WriteFunOpt, get_binding(Worker1) | ?DEFAULT_RTRANSFER_OPTS],
      RtransferOpts2 = [ReadFunOpt, WriteFunOpt, get_binding(Worker2) | ?DEFAULT_RTRANSFER_OPTS],
  
      %% when
      prepare_rtransfer(
          {Worker1, [[get_binding(Worker1) | RtransferOpts1]]},
          {Worker2, [[get_binding(Worker2) | RtransferOpts2]]},
          ?TEST_FILE_UUID, ?TEST_OFFSET, DataSize,
          notify_fun(), on_complete_fun(self())
      ),
  
      %% then
      ?assertReceivedMatch({on_complete, {error,{storage,_}}}, ?TIMEOUT).
  
  error_write_fun_test(Config) ->
      %% test with write_fun callback returning an error
      [Worker1, Worker2 | _] = ?config(op_worker_nodes, Config),
  
      %% given
      DataSize = ?TEST_BLOCK_SIZE,
      Data = generate_binary(DataSize),
      WriteFunOpt = make_opt_fun(write_fun, {error, ?FILE_HANDLE2, test_error}),
      ReadFunOpt = make_opt_fun(read_fun, {ok, ?FILE_HANDLE2, Data}),
      RtransferOpts1 = [ReadFunOpt, WriteFunOpt, get_binding(Worker1) | ?DEFAULT_RTRANSFER_OPTS],
      RtransferOpts2 = [ReadFunOpt, WriteFunOpt, get_binding(Worker2) | ?DEFAULT_RTRANSFER_OPTS],
  
      %% when
      prepare_rtransfer(
          {Worker1, [[get_binding(Worker1) | RtransferOpts1]]},
          {Worker2, [[get_binding(Worker2) | RtransferOpts2]]},
          ?TEST_FILE_UUID, ?TEST_OFFSET, DataSize,
          notify_fun(), on_complete_fun(self())
      ),
  
      %% then
      ?assertReceivedMatch({on_complete, {error,{storage,_}}}, ?TIMEOUT).
  
  bad_formatted_request_test(Config) ->
      %% test calling fetch with bad _request
      [Worker1, Worker2 | _] = ?config(op_worker_nodes, Config),
  
      %% given
      DataSize = ?TEST_BLOCK_SIZE,
      Data = generate_binary(DataSize),
      WriteFunOpt = make_opt_fun(write_fun, {ok, ?FILE_HANDLE2, DataSize}),
      ReadFunOpt = make_opt_fun(read_fun, {ok, ?FILE_HANDLE2, Data}),
      RtransferOpts1 = [ReadFunOpt, WriteFunOpt, get_binding(Worker1) | ?DEFAULT_RTRANSFER_OPTS],
      RtransferOpts2 = [ReadFunOpt, WriteFunOpt, get_binding(Worker2) | ?DEFAULT_RTRANSFER_OPTS],
  
      %% when
      ?assertMatch({ok, _}, start_rtransfer(Worker1, RtransferOpts1)),
      ?assertMatch({ok, _}, start_rtransfer(Worker2, RtransferOpts2)),
      fetch_data(Worker1, {bad_request}, notify_fun(), on_complete_fun(self())),
  
      %% then
      ?assertReceivedMatch({on_complete, {error, _}}, ?TIMEOUT).
  
  bad_file_offset_test(Config) ->
      %% test calling fetch with file offset greater than file size
      [Worker1, Worker2 | _] = ?config(op_worker_nodes, Config),
  
      %% given
      DataSize = ?TEST_BLOCK_SIZE,
      %% offset is bigger than DataSize
      Offset = DataSize + 10,
      Data = generate_binary(DataSize),
      WriteFunOpt = make_opt_fun(write_fun, {ok, ?FILE_HANDLE2, DataSize}),
      ReadFunOpt = make_opt_fun(read_fun, {ok, ?FILE_HANDLE2, Data}),
      RtransferOpts1 = [ReadFunOpt, WriteFunOpt, get_binding(Worker1) | ?DEFAULT_RTRANSFER_OPTS],
      RtransferOpts2 = [ReadFunOpt, WriteFunOpt, get_binding(Worker2) | ?DEFAULT_RTRANSFER_OPTS],
  
  