added new test cases for StreamHandler