void () { mySynchronizer = new MockProcessStreamsSynchronizer(getTestRootDisposable()); mySynchronizer.doWhenStreamsSynchronized("Hello stdout 1\n", ProcessOutputType.STDOUT, 0); mySynchronizer.doWhenStreamsSynchronized("Hello stdout 2\n", ProcessOutputType.STDOUT, 1); mySynchronizer.doWhenStreamsSynchronized("Hello stderr 1\n", ProcessOutputType.STDERR, 2); assertFlushedChunks(new FlushedChunk("Hello stdout 1\n", ProcessOutputType.STDOUT, 0), new FlushedChunk("Hello stdout 2\n", ProcessOutputType.STDOUT, 1)); mySynchronizer.advanceTimeTo(1 + AWAIT_SAME_STREAM_TEXT_MILLIS); assertFlushedChunks(new FlushedChunk("Hello stderr 1\n", ProcessOutputType.STDERR, 1 + AWAIT_SAME_STREAM_TEXT_MILLIS)); assertNoPendingChunks(); }