Test code for downloading and outputting data