anchor.diff:      end,
   
       case PieceIndex of
  -        not_interested ->
  -            {reply, {ok, not_interested}, State};
           assigned ->
               {reply, {ok, assigned}, State};
           Index ->
  
positive.code:     Pid ! die,
      etorrent_utils:wait(Ref).
  
  not_interested_case() ->
      Has = etorrent_pieceset:from_list([], 3),
      Ret = ?chunkstate:request(1, Has, progress()),
      ?assertEqual({ok, not_interested}, Ret).
  
  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),
  
negative.code:     end,
  
      PieceIndex = case Targetstate of
          %% Assume that the peer has pieces that are interesting but
          %% all requests for these pieces have been assigned.
          none ->
              assigned;
          %% One or more that we are already downloading
          begun ->
              etorrent_pieceset:min(Optimal);
  