anchor.diff:           handle_info/2,
            terminate/2,
            code_change/3]).
  +
  +-import(gen_server, [call/2]).
   
   -type chunkset()   :: etorrent_chunkset:chunkset().
   -type pieceset()   :: etorrent_pieceset:pieceset().
  
positive.code: %% @todo: What pid is the chunk recording pid? Control or SendPid?
  %% API
  -export([start_link/4,
           mark_fetched/4,
           mark_stored/4,
           mark_dropped/4,
  
negative.code:     ok  = receive {'DOWN', _, process, Pid, _} -> ok end,
      ?assertMatch({ok, [{0, 0, 1}]}, ?chunk_server:request_chunks(10, Has, 1)).
  
  
  mark_valid_not_stored_case() ->
      Srv = initial_chunk_server(11),
      Has = etorrent_pieceset:from_list([0], 3),
      Ret = ?chunk_server:mark_valid(11, 0),
      ?assertEqual({error, not_stored}, Ret).
  
  mark_valid_stored_case() ->
      Srv = initial_chunk_server(12),
      Has = etorrent_pieceset:from_list([0,1], 3),
      {ok, [{0, 0, 1}]} = ?chunk_server:request_chunks(12, Has, 1),
      {ok, [{0, 1, 1}]} = ?chunk_server:request_chunks(12, Has, 1),
      ok  = ?chunk_server:mark_stored(12, 0, 0, 1),
      ok  = ?chunk_server:mark_stored(12, 0, 1, 1),
      ?assertEqual(ok, ?chunk_server:mark_valid(12, 0)).
  
  -endif.
  