Add test for converting a stream warning into exception