Added tests for stream wrapping.