Added a test for stream wrapping