anchor.diff:              verify_fun = VerifyFun,
   
               data_spec = api_test_utils:add_file_id_errors_for_operations_available_in_share_mode(
  -                DirGuid, undefined, DataSpec#data_spec{
  +                DirGuid, undefined, #data_spec{
  +                    optional = [<<"range">>],
  +                    correct_values = #{<<"range">> => RangesToTestPart1},
                       bad_values = [{bad_id, DirObjectId, {rest, ?ERROR_POSIX(?EISDIR)}}]
                   }
               )
  
positive.code:             verify_fun = VerifyFun,
  
              data_spec = api_test_utils:add_file_id_errors_for_operations_available_in_share_mode(
                  DirGuid, DirShareId, DataSpec#data_spec{
                      bad_values = [{bad_id, DirShareObjectId, {rest, ?ERROR_POSIX(?EISDIR)}}]
                  }
              )
  
negative.code: 
  
  %% @private
  -spec get_fetched_block_size({offset(), size()}, file_meta:size()) -> size().
  get_fetched_block_size({RangeStart, RangeLen}, FileSize) ->
      % posix storage has no block size so fetched blocks will not be tailored to
      % block boundaries but they will not be smaller than 'minimal_sync_request'
      % (only exception to this is fetching last bytes of file).
      PreferableFetchBlockSize = max(RangeLen, ?DEFAULT_READ_BLOCK_SIZE),
  
      case (RangeStart + PreferableFetchBlockSize) > FileSize of
          true -> FileSize - (RangeStart rem FileSize);
          false -> PreferableFetchBlockSize
      end.
  
  
  %%%===================================================================
  %%% Internal functions
  %%%===================================================================
  
  
  %% @private
  -spec build_download_file_setup_fun(
      api_test_memory:mem_ref(),
      FileContent :: binary(),
      onenv_api_test_runner:ct_config()
  ) ->
      onenv_api_test_runner:setup_fun().
  build_download_file_setup_fun(MemRef, Content, Config) ->
      [P1Node] = api_test_env:get_provider_nodes(p1, Config),
      [P2Node] = api_test_env:get_provider_nodes(p2, Config),
      Providers = [P1Node, P2Node],
  
      UserSessIdP1 = api_test_env:get_user_session_id(user3, p1, Config),
      SpaceOwnerSessIdP1 = api_test_env:get_user_session_id(user2, p1, Config),
  
      FileSize = size(Content),
  
      fun() ->
          FilePath = filename:join(["/", ?SPACE_2, ?RANDOM_FILE_NAME()]),
          {ok, FileGuid} = api_test_utils:create_file(<<"file">>, P1Node, UserSessIdP1, FilePath, 8#704),
          {ok, ShareId} = lfm_proxy:create_share(P1Node, SpaceOwnerSessIdP1, {guid, FileGuid}, <<"share">>),
          api_test_utils:write_file(P1Node, UserSessIdP1, FileGuid, 0, Content),
  
          ?assertMatch(
              {ok, #file_attr{size = FileSize, shares = [ShareId]}},
              api_test_utils:get_file_attrs(P2Node, FileGuid),
              ?ATTEMPTS
          ),
          api_test_utils:assert_distribution(Providers, [FileGuid], [{P1Node, FileSize}]),
  
          api_test_memory:set(MemRef, file_guid, FileGuid),
          api_test_memory:set(MemRef, share_id, ShareId)
      end.
  
  
  %% @private
  -spec build_download_file_verify_fun(
      api_test_memory:mem_ref(),
      file_meta:size(),
      onenv_api_test_runner:ct_config()
  ) ->
      onenv_api_test_runner:verify_fun().
  build_download_file_verify_fun(MemRef, FileSize, Config) ->
      [P1Node] = api_test_env:get_provider_nodes(p1, Config),
      [P2Node] = api_test_env:get_provider_nodes(p2, Config),
      Providers = [P1Node, P2Node],
  