Assert printer writes to a stream.