anchor.diff:      {ok, PPid} = ?pending:start_link(testid()),
       {ok, CPid} = ?progress:start_link(testid(), 1, Valid, [{0, 2}, {1, 2}, {2, 2}], self()),
       ok = ?pending:register(PPid),
  +    ok = ?pending:receiver(CPid, PPid),
       {Time, PPid, SPid, CPid}.
   
   scarcity() -> ?scarcity:lookup_server(testid()).
  
positive.code:     ok.
  
  
  %% @doc
  %% Request a unique set of chunks from the server.
  %% @end
  -spec request(torrent_id(), pieceset(), pos_integer()) ->
      {ok, list({piece_index(), chunk_offset(), chunk_len()})}
      | {ok, not_interested | assigned}.
  request(TorrentID, Pieceset, Numchunks) ->
      ChunkSrv = lookup_server(TorrentID),
      call(ChunkSrv, {request, self(), Pieceset, Numchunks}).
  
  
  %% @doc Print chunk server statistics
  %% @end
  -spec stats(torrent_id()) -> ok.
  
negative.code: not_interested_valid_case() ->
      Has = etorrent_pieceset:from_list([0], 3),
      _   = ?chunkstate:request(2, Has, progress()),
      ok  = ?chunkstate:stored(0, 0, 1, self(), progress()),
      ok  = ?chunkstate:stored( 0, 1, 1, self(), progress()),
      ok  = ?piecestate:valid(0, progress()),
      Ret = ?chunkstate:request(2, Has, progress()),
      ?assertEqual({ok, not_interested}, Ret).
  
  request_one_case() ->
      Has = etorrent_pieceset:from_list([0], 3),
      Ret = ?chunkstate:request(1, Has, progress()),
      ?assertEqual({ok, [{0, 0, 1}]}, Ret).
  
  mark_dropped_case() ->
      Has = etorrent_pieceset:from_list([0], 3),
      {ok, [{0, 0, 1}]} = ?chunkstate:request(1, Has, progress()),
      {ok, [{0, 1, 1}]} = ?chunkstate:request(1, Has, progress()),
      ok  = ?chunkstate:dropped(0, 0, 1, self(), progress()),
      Ret = ?chunkstate:request(1, Has, progress()),
      ?assertEqual({ok, [{0, 0, 1}]}, Ret).
  
  mark_all_dropped_case() ->
      Has = etorrent_pieceset:from_list([0], 3),
      ?assertMatch({ok, [{0, 0, 1}]}, ?chunkstate:request(1, Has, progress())),
      ?assertMatch({ok, [{0, 1, 1}]}, ?chunkstate:request(1, Has, progress())),
      ok = ?chunkstate:dropped(self(), pending()),
      ok = ?chunkstate:dropped([{0,0,1},{0,1,1}], self(), progress()),
      etorrent_utils:ping(pending()),
      etorrent_utils:ping(progress()),
      ?assertMatch({ok, [{0, 0, 1}]}, ?chunkstate:request(1, Has, progress())),
      ?assertMatch({ok, [{0, 1, 1}]}, ?chunkstate:request(1, Has, progress())).
  
  drop_all_on_exit_case() ->
      Has = etorrent_pieceset:from_list([0], 3),
      Pid = spawn_link(fun() ->
          ok = ?pending:register(pending()),
          {ok, [{0, 0, 1}]} = ?chunkstate:request(1, Has, progress()),
          {ok, [{0, 1, 1}]} = ?chunkstate:request(1, Has, progress())
      end),
      etorrent_utils:wait(Pid),
      timer:sleep(100),
      ?assertMatch({ok, [{0, 0, 1}]}, ?chunkstate:request(1, Has, progress())),
      ?assertMatch({ok, [{0, 1, 1}]}, ?chunkstate:request(1, Has, progress())).
  
  drop_none_on_exit_case() ->
      Has = etorrent_pieceset:from_list([0], 3),
  