Improved TextOutputWriter test