void () { Process testProcess = AnsiEscapeDecoderTest.createTestProcess(); ByteArrayOutputStream outputStream = (ByteArrayOutputStream)testProcess.getOutputStream(); AnsiEscapeDecoderTest.withProcessHandlerFrom(testProcess, handler -> withCycleConsoleNoFolding(100, console -> { console.attachToProcess(handler); outputStream.reset(); console.print("I", ConsoleViewContentType.USER_INPUT); console.waitAllRequests(); assertEquals(0, outputStream.size()); console.print("K", ConsoleViewContentType.USER_INPUT); console.waitAllRequests(); assertEquals(0, outputStream.size()); console.print("\n", ConsoleViewContentType.USER_INPUT); console.waitAllRequests(); assertEquals("IK\n", outputStream.toString()); })); }