anchor.diff:      rt:setup_harness(dummy, dummy),
   
       lager:info("Spinning up test nodes"),
  -    Versions = [ current || _ <- lists:seq(1, NTestNodes)],
  +    Versions = [current || _ <- lists:seq(1, NTestNodes)],
       [RootNode | TestNodes] = rt:deploy_nodes(Versions,[replication]),
       rt:wait_for_service(RootNode, replication),
   
  
positive.code: 
      %% Test handoff on each node:
      lager:info("Testing handoff for cluster."),
      lists:foreach(fun(TestNode) -> test_handoff(RootNode, TestNode, NTestItems) end, TestNodes),
  
      %% Prepare for the next call to our test (we aren't polite about it, it's faster that way):
      lager:info("Bringing down test nodes."),
      lists:foreach(fun(N) -> rt:brutal_kill(N) end, TestNodes),
  
  
negative.code:     ?assertEqual(ok, rt:wait_until_nodes_ready([RootNode, NewNode])),
      rt:wait_until_no_pending_changes([RootNode, NewNode]),
  
      %% See if we get the same data back from the joined node that we
      %% added to the root node.  Note: systest_read() returns
      %% /non-matching/ items, so getting nothing back is good:
      lager:info("Validating data after handoff:"),
      Results = multiple_reads(NewNode, 1, NTestItems),
      lager:info("The read data looks like: ~p", [Results]),
      ?assertEqual(0, length(Results)),
      lager:info("Data looks ok."),
  
      pass.
  
  multiple_writes(Node, Start, End, Actor)->
      F = fun(N, Acc) ->
              case rpc:call(Node, floppy, append, [N, {{increment, N}, Actor}]) of
                  {ok, _} ->
                      Acc;
                  Other ->
                      [{N, Other} | Acc]
              end
      end,
      lists:foldl(F, [], lists:seq(Start, End)).
  
  multiple_reads(Node, Start, End) ->
      F = fun(N, Acc) ->
              case rpc:call(Node, floppy, read, [N, riak_dt_gcounter]) of
                  {error, _} ->
                      [{N, error} | Acc];
                  {ok, Value} ->
                      case Value =:= N of
                          true ->
                              Acc;
                          false ->
                              [{N, {wrong_val, Value}} | Acc]
                      end
              end
      end,
      lists:foldl(F, [], lists:seq(Start, End)).
  