test handle of stream