void () { mySynchronizer = new MockProcessStreamsSynchronizer(getTestRootDisposable()); long startTime = 10; Assert.assertTrue(AWAIT_SAME_STREAM_TEXT_MILLIS >= 3); mySynchronizer.doWhenStreamsSynchronized("info:", ProcessOutputType.STDOUT, startTime); mySynchronizer.doWhenStreamsSynchronized("error\n", ProcessOutputType.STDERR, startTime + 1); mySynchronizer.doWhenStreamsSynchronized("rest of info\n", ProcessOutputType.STDOUT, startTime + 2); assertFlushedChunks(new FlushedChunk("info:", ProcessOutputType.STDOUT, startTime), new FlushedChunk("rest of info\n", ProcessOutputType.STDOUT, startTime + 2)); mySynchronizer.advanceTimeTo(startTime + AWAIT_SAME_STREAM_TEXT_MILLIS); assertFlushedChunks(new FlushedChunk("error\n", ProcessOutputType.STDERR, startTime + AWAIT_SAME_STREAM_TEXT_MILLIS)); assertNoPendingChunks(); }