Add tests for io streams.
Add tests for io streams.