anchor.diff:      ?assertEqual(Pid, ?scarcity:lookup_scarcity_server(1)).
   
   initial_ordering_case({N, Time, Pid}) ->
  -    {ok, Order} = ?scarcity:get_order(2, pieces([0,1,2,3,4,5,6,7])),
  +    {ok, Order} = ?scarcity:get_order(N, pieces([0,1,2,3,4,5,6,7])),
       ?assertEqual([0,1,2,3,4,5,6,7], Order).
   
   empty_ordering_case({N, Time, Pid}) ->
  
positive.code: peer_exit_update_case({N, Time, _}) ->
      Main = self(),
      Pid = spawn_link(fun() ->
          ok = ?scarcity:add_peer(10, pieces([0,1,2,3])),
          Main ! done,
          receive die -> ok end
      end),
      receive done -> ok end,
      {ok, Ref, _} = ?scarcity:watch(10, ten, pieces([0,2,4,6])),
      Pid ! die,
      ?assertEqual(1, ?timer:fire(Time)),
      receive
  
negative.code:     ?assertEqual(ok, ?scarcity:add_peer(4, pieces([]))).
  
  one_available_case({N, Time, Pid}) ->
      ok = ?scarcity:add_peer(N, pieces([])),
      ?assertEqual(ok, ?scarcity:add_piece(N, 0, pieces([0]))),
      Pieces  = pieces([0,1,2,3,4,5,6,7]),
      {ok, Order} = ?scarcity:get_order(N, Pieces),
      ?assertEqual([1,2,3,4,5,6,7,0], Order).
  
  decrement_on_exit_case({N, Time, _}) ->
      Main = self(),
      Pid = spawn_link(fun() ->
          ok = ?scarcity:add_peer(N, pieces([0])),
          ok = ?scarcity:add_piece(N, 2, pieces([0,2])),
          Main ! done,
          receive die -> ok end
      end),
      receive done -> ok end,
      Pieces  = ?pieceset:from_list([0,1,2,3,4,5,6,7], 8),
      {ok, O1} = ?scarcity:get_order(N, pieces([0,1,2,3,4,5,6,7])),
      ?assertEqual([1,3,4,5,6,7,0,2], O1),
      Ref = monitor(process, Pid),
      Pid ! die,
      receive {'DOWN', Ref, _, _, _} -> ok end,
      {ok, O2} = ?scarcity:get_order(N, Pieces),
      ?assertEqual([0,1,2,3,4,5,6,7], O2).
  
  init_watch_case({N, Time, Pid}) ->
      {ok, Ref, Order} = ?scarcity:watch(N, seven, pieces([0,2,4,6])),
      ?assert(is_reference(Ref)),
      ?assertEqual([0,2,4,6], Order).
  
  add_peer_update_case({N, Time, Pid}) ->
      {ok, Ref, _} = ?scarcity:watch(N, eight, pieces([0,2,4,6])),
      ?assertEqual(1, ?timer:fire(Time)),
      ok = ?scarcity:add_peer(N, pieces([0,2])),
      receive
          {scarcity, Ref, Tag, Order} ->
              ?assertEqual(eight, Tag),
  