The change consists of comparing not the output stream but contents of some text box in the program itself that contains a log of performed operations.
Consider an example of testing an FTP client–the server and the client exchange textual messages according to the FTP protocol[7].
The log is usually displayed somewhere in the client application so the test environment might fetch the contents of the object displaying the log and compare it to what should be received (according to the file transfer protocol) after performing a requested series of commands.
There is a variation of this method where you compare binary objects produced by the application, like the transferred file itself to the original one stored on the remote server.