anchor.diff:          set_ha(KeyNode2, master_up, [])
       end, ?TEST_MODELS -- [disc_only_model]).
   
  -node_transition_test(Config, Method) ->
  +node_transition_test(Config, Method, SpawnAndSleep, DelayRingRepair) ->
       {Key, KeyNode, KeyNode2, TestWorker} = prepare_ha_test(Config),
       MasterPid = self(),
   
  
positive.code:         assert_not_in_memory(KeyNode, Model, Key),
  
          UpdateFun = fun({M, F1, F2, F3}) ->
              MasterPid ! {update, F1, node()},
              {ok, {M, F1 + 1, F2, F3}}
          end,
          ?assertMatch({ok, #document{}}, rpc:call(TestWorker, Model, update, [Key, UpdateFun])),
  
          mock_node_up(TestWorker, KeyNode2, KeyNode), % TODO - przetestowac bez zmiany chash_ring (samo master_up)
  
          ?assertMatch({ok, #document{}}, rpc:call(TestWorker, Model, update, [Key, UpdateFun])),
  
  
negative.code:     saves_should_change_node_dynamic(Config, call).
  
  node_transition_test_cast_ha_test(Config) ->
      node_transition_test(Config, cast, false, false).
  
  node_transition_test_call_ha_test(Config) ->
      node_transition_test(Config, call, false, false).
  
  node_transition_with_sleep_test_cast_ha_test(Config) ->
      node_transition_test(Config, cast, true, false).
  
  node_transition_with_sleep_test_call_ha_test(Config) ->
      node_transition_test(Config, call, true, false).
  
  node_transition_delayed_ring_repair_test_cast_ha_test(Config) ->
      node_transition_test(Config, cast, false, true).
  
  node_transition_delayed_ring_repair_test_call_ha_test(Config) ->
      node_transition_test(Config, call, false, true).
  
  node_transition_sleep_and_delayed_ring_repair_test_cast_ha_test(Config) ->
      node_transition_test(Config, cast, true, true).
  
  node_transition_sleep_and_delayed_ring_repair_test_call_ha_test(Config) ->
      node_transition_test(Config, call, true, true).
  
  %%%===================================================================
  %%% HA tests skeletons and helper functions
  