adapt unit tests to the modified stream wrapper