anchor.diff:      Contents = list_to_binary( lists:duplicate(1000, lists:seq(0,255)) ),
       Config = set_state([reset, {mkfile,File,Contents}], Config0),
       Pid = proplists:get_value(ftp, Config),
  -    {{error, "ftp:recv_chunk_start/2 not called"},_} = recv_chunk(Pid, <<>>),
  +    {error, "ftp:recv_chunk_start/2 not called"} = do_recv_chunk(Pid),
       ok = ftp:recv_chunk_start(Pid, id2ftp(File,Config)),
  -    {ok, ReceivedContents, _Ncunks} = recv_chunk(Pid, <<>>),
  +    {ok, ReceivedContents} = do_recv_chunk(Pid),
       find_diff(ReceivedContents, Contents).
   
   recv_chunk_twice() ->
  
positive.code:     Contents2 = crypto:strong_rand_bytes(1200),
      Config = set_state([reset, {mkfile,File1,Contents1}, {mkfile,File2,Contents2}], Config0),
      Pid = proplists:get_value(ftp, Config),
      {{error, "ftp:recv_chunk_start/2 not called"},_} = recv_chunk(Pid, <<>>),
      ok = ftp:recv_chunk_start(Pid, id2ftp(File1,Config)),
      {ok, ReceivedContents1, _Ncunks1} = recv_chunk(Pid, <<>>),
      ok = ftp:recv_chunk_start(Pid, id2ftp(File2,Config)),
      {ok, ReceivedContents2, _Ncunks2} = recv_chunk(Pid, <<>>),
      find_diff(ReceivedContents1, Contents1),
      find_diff(ReceivedContents2, Contents2).
  
  
negative.code: 
      Config = set_state([reset, {mkfile,File1,Contents1}, {mkfile,File2,Contents2}, {mkfile,File3,Contents3}], Config0),
      Pid = proplists:get_value(ftp, Config),
      {error, "ftp:recv_chunk_start/2 not called"} = do_recv_chunk(Pid),
  
      ok = ftp:recv_chunk_start(Pid, id2ftp(File3,Config)),
      {ok, ReceivedContents3} = do_recv_chunk(Pid),
      
      ok = ftp:recv_chunk_start(Pid, id2ftp(File1,Config)),
      {ok, ReceivedContents1} = do_recv_chunk(Pid),
  
      ok = ftp:recv_chunk_start(Pid, id2ftp(File2,Config)),
      {ok, ReceivedContents2} = do_recv_chunk(Pid),
  
      find_diff(ReceivedContents1, Contents1),
      find_diff(ReceivedContents2, Contents2),
      find_diff(ReceivedContents3, Contents3).
  
  
  do_recv_chunk(Pid) -> 
      recv_chunk(Pid, <<>>).
  recv_chunk(Pid, Acc) -> 
      case ftp:recv_chunk(Pid) of
  	ok -> 
              {ok, Acc};
  	{ok, Bin} -> 
              recv_chunk(Pid, <<Acc/binary, Bin/binary>>);
  	Error -> 
              Error
      end.
  
  %% Make new test case that uses this or new code
  %% only test one thing at the time
  %% delay_recv_chunk(Pid) -> 
  %%     delay_recv_chunk(Pid, <<>>).
  %% delay_recv_chunk(Pid, Acc) -> 
  %%     ct:pal("FOO ~p", [byte_size(Acc)]),
  %%     case ftp:recv_chunk(Pid) of
  %% 	ok -> 
  %%             {ok, Acc};
  %% 	{ok, Bin} -> 
  %%             ct:sleep(100),
  %%             delay_recv_chunk(Pid, <<Acc/binary, Bin/binary>>);
  %% 	Error -> 
  %%             Error
  %%     end.
  
  %%-------------------------------------------------------------------------
  type() -> 
  