anchor.diff:      % given
       [Node | _] = ?config(oz_worker_nodes, Config),
       P1 = create_provider(Node, ?ID(p1), []),
  -    save_user(Node, ?ID(u1), [], []),
  +    U1 = #onedata_user{name = <<"u1">>},
  +    save(Node, ?ID(u1), U1),
       Rev0 = get_rev(Node, onedata_user, ?ID(u1)),
  -    call_worker(Node, {add_connection, P1, self()}),
   
       % when
       Context = init_messages(Node, P1, []),
  
positive.code:     % given
      [Node | _] = ?config(oz_worker_nodes, Config),
      P1 = create_provider(Node, ?ID(p1), []),
      save_user(Node, ?ID(u1), [], []),
      save_group(Node, ?ID(g1), [?ID(u1)], []),
      call_worker(Node, {add_connection, P1, self()}),
  
      % when
      Context1 = init_messages(Node, P1, [?ID(u1)]),
      Context = flush_messages(Context1, group_expectation(?ID(g1), ?ID(g1), [{?ID(u1), []}], [])),
      update_document(Node, user_group, ?ID(g1), #{name => <<"updated">>}),
  
      % then
      verify_messages_present(Context, [
          group_expectation(?ID(g1), <<"updated">>, [{?ID(u1), []}], [])
      ]),
      ok.
  
  
negative.code:     % given
      [Node | _] = ?config(oz_worker_nodes, Config),
      P1 = create_provider(Node, ?ID(p1), [
          ?ID(s1), ?ID(s2), ?ID(s3), ?ID(s4), ?ID(s5), ?ID(s6), ?ID(s7), ?ID(s8), ?ID(s9)
      ]),
      Space = #space{name = <<"initial">>, providers = [P1]},
      save(Node, ?ID(s1), Space),
      save(Node, ?ID(s3), Space),
      save(Node, ?ID(s2), Space),
      save(Node, ?ID(s4), Space),
      save(Node, ?ID(s5), Space),
      save(Node, ?ID(s6), Space),
      save(Node, ?ID(s7), Space),
      save(Node, ?ID(s8), Space),
      save(Node, ?ID(s9), Space),
  
      % when
      Copy = Context = init_messages(Node, P1, []),
      flush_messages(Context, expectation(?ID(s9), Space)),
      empty_first_half_of_cache(Node),
  
      % then
      verify_messages_present(Copy, [
          expectation(?ID(s1), Space),
          expectation(?ID(s2), Space),
          expectation(?ID(s3), Space),
          expectation(?ID(s4), Space),
          expectation(?ID(s5), Space),
          expectation(?ID(s6), Space),
          expectation(?ID(s7), Space),
          expectation(?ID(s8), Space),
          expectation(?ID(s9), Space)
      ]),
      ok.
  
  