Jason House wrote: > I'm having trouble writing a unit test to check code that communicates via > standard in and standard out. Attached to this post is my a reduced form > of my problems. Can anyone tell me what's going wrong? (The assert in the > code fails) You need to rewind the file before starting to read after writing: fakeConsole.seek(0);