Fixed broken test r.e. writing.

Does not affect the program's behavior. The test itself was incorrect.