Testing writing of data