writing streaming tests