Unit tests for Stream