anchor.diff:  % leave helper
   %
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  +
  +join_leave_test(JoinTargetSize, LeaveTargetSize) ->
  +    wait_for_ring_size(1),
  +    wait_for_correct_ring(),
  +    join_until(JoinTargetSize),
  +    leave_until(JoinTargetSize, LeaveTargetSize),
  +    true.
   
   leave_until(TargetSize, TargetSize) ->
       ok;
  
positive.code: 
  
  test_single_join(_Config) ->
      wait_for_ring_size(1),
      wait_for_correct_ring(),
      %ct:pal("leases ~p", [get_all_leases()]),
      join_until(2),
      true.
  
  test_double_join(_Config) ->
      wait_for_ring_size(1),
      wait_for_correct_ring(),
      %ct:pal("leases ~p", [get_all_leases()]),
      join_until(3),
      true.
  
  test_triple_join(_Config) ->
      wait_for_ring_size(1),
      wait_for_correct_ring(),
      %ct:pal("leases ~p", [get_all_leases()]),
      join_until(4),
      true.
  
  test_quadruple_join(_Config) ->
      wait_for_ring_size(1),
      wait_for_correct_ring(),
      %ct:pal("leases ~p", [get_all_leases()]),
      join_until(5),
      true.
  
  test_quadruple_join_single_leave(_Config) ->
      wait_for_ring_size(1),
      wait_for_correct_ring(),
      %ct:pal("leases ~p", [get_all_leases()]),
      join_until(5),
      leave_until(5, 4),
      true.
  
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %
  % join helper
  %
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  join_until(TargetSize) ->
      joiner_helper(1, TargetSize).
  
negative.code:             unittest_helper:stop_ring(),
              {priv_dir, PrivDir} = lists:keyfind(priv_dir, 1, Config),
              unittest_helper:make_ring(1, [{config, [{log_path, PrivDir},
                                                      {leases, true},
                                                      {leases_gc, false}]}]),
              Config
      end.
  
  