anchor.diff:  
   handle_call({add_piece, Pid, PieceIndex}, _, State) ->
       #state{peer_monitors=Monitors, num_peers=Numpeers} = State,
  -    NewNumpeers = etorrent_scarcity:increment(PieceIndex, Numpeers),
  +    Prev = array:get(PieceIndex, Numpeers),
  +    NewNumpeers = array:set(PieceIndex, Prev + 1, Numpeers),
       Pieceset = etorrent_monitorset:fetch(Pid, Monitors),
       NewPieceset = etorrent_pieceset:insert(PieceIndex, Pieceset),
  -    NewMonitors = etorrent_monitorset:insert(Pid, NewPieceset, Monitors),
  +    NewMonitors = etorrent_monitorset:update(Pid, NewPieceset, Monitors),
       NewState = State#state{
           peer_monitors=NewMonitors,
           num_peers=NewNumpeers},
  
positive.code:     InitState = #state{
          torrent_id=TorrentID,
          num_pieces=NumPieces,
          num_peers=array:new(),
          peer_monitors=etorrent_monitorset:new()},
      {ok, InitState}.
  
  
negative.code:     {ok, Order} = ?scarcity:get_order(3, Pieces),
      ?assertEqual([], Order).
  
  init_pieceset_case() ->
      {ok, _} = ?scarcity:start_link(4, 8),
      {ok, Set} = ?scarcity:add_peer(4),
      ?assertEqual([], ?pieceset:to_list(Set)).
  
  one_available_case() ->
      {ok, _} = ?scarcity:start_link(5, 8),
      {ok, _} = ?scarcity:add_peer(5),
      {ok, _} = ?scarcity:add_piece(5, 0),
      Pieces  = ?pieceset:from_list([0,1,2,3,4,5,6,7], 8),
      {ok, Order} = ?scarcity:get_order(5, Pieces),
      ?assertEqual([1,2,3,4,5,6,7,0], Order).
  
  -endif.
  