Testing unregistering the stream from the loop