anchor.diff:          [?_test(lookup_registered_case()),
            ?_test(unregister_case()),
            ?_test(not_interested_case()),
  -         ?_test(request_one_case())
  +         ?_test(request_one_case()),
  +         ?_test(mark_stored_case())
           ]}.
   
   lookup_registered_case() ->
  
positive.code: handle_call({mark_stored, Pid, PieceIndex, Offset, Length}, _, State) ->
      %% The calling process has written this chunk to disk.
      %% Remove it from the list of open requests of the process.
      #state{peer_monitors=PeerMonitors} = State,
      OpenRequests = etorrent_monitorset:fetch(Pid, PeerMonitors),
      NewRequests  = gb_trees:delete({PieceIndex, Offset}, OpenRequests),
      NewMonitors  = etorrent_monitorset:store(Pid, NewRequests, PeerMonitors),
      NewState     = State#state{peer_monitors=NewMonitors},
      {reply, ok, NewState}.
  
  handle_cast(_, _) ->
      not_implemented.
  
negative.code:         PieceIndex ->
              Chunkset    = array:get(PieceIndex, PieceChunks),
              {Offs, Len} = etorrent_chunkset:min(Chunkset),
              ?debugVal([Offs, Len, Chunkset]),
              NewChunkset = etorrent_chunkset:delete(Offs, Len, Chunkset),
              NewChunks   = array:set(PieceIndex, NewChunkset, PieceChunks),
              NewChunked  = etorrent_pieceset:insert(PieceIndex, PiecesChunked),
              %% Add the chunk to this peer's set of open requests
              OpenReqs = etorrent_monitorset:fetch(PeerPid, Peers),
              NewReqs  = gb_trees:insert({PieceIndex, Offs}, Len, OpenReqs),
              NewPeers = etorrent_monitorset:update(PeerPid, NewReqs, Peers),
  
              NewState = State#state{
                  pieces_chunked=NewChunked,
                  piece_chunks=NewChunks,
                  peer_monitors=NewPeers},
              {reply, {ok, [{PieceIndex, Offs, Len}]}, NewState}
      end;
  
  