Add unit tests for the class methods of Stream