Add test for streamFlush