added test for lib/stream