anchor.diff:              lists:usort(Received)
       end.
   
  -%% Clean mailbox
  +%% Cleans mailbox
   flush() ->
       receive
           _ ->
  
positive.code: %%% Internal functions
  %%%===================================================================
  
  %% Receive all messages with given prefix
  receive_all(Prefix, Received) ->
      receive
          {Prefix, Data} ->
              receive_all(Prefix, [Data | Received])
      after
  
negative.code: %% Test stream with finite until value
  finite_stream_test(Config) ->
      [W | _] = ?config(cluster_worker_nodes, Config),
      Pid = self(),
  
      BaseVal = #test_record_1{field1 = 1, field2 = 2, field3 = 3},
      BaseMod = test_record_1,
  
      save_docs(W, BaseVal, BaseMod, 1, 10),
      receive_all(finite_stream_test, []),
  
      save_docs(W, BaseVal, BaseMod, 11, 20),
      ReceivedFromInfinite = receive_all(finite_stream_test, []),
      Since = element(1, lists:nth(1, ReceivedFromInfinite)) - 1,
      Until = element(1, lists:last(ReceivedFromInfinite)),
  
      save_docs(W, BaseVal, BaseMod, 21, 30),
      receive_all(finite_stream_test, []),
  
      {_, DriverPid} = ?assertMatch(
          {ok, _},
  