StreamFactory read and write stream tests