void () { configureByText(JavaFileType.INSTANCE, """ class AClass<caret> { } """); assertEmpty(highlightErrors()); ConsoleView consoleView = TextConsoleBuilderFactory.getInstance().createBuilder(getProject()).getConsole(); consoleView.getComponent(); //create editor consoleView.print("haha", ConsoleViewContentType.NORMAL_OUTPUT); UIUtil.dispatchAllInvocationEvents(); try { checkDaemonReaction(false, () -> { consoleView.clear(); try { Thread.sleep(300); // *&^ing alarm } catch (InterruptedException e) { LOG.error(e); } UIUtil.dispatchAllInvocationEvents(); //flush }); checkDaemonReaction(false, () -> { consoleView.print("sss", ConsoleViewContentType.NORMAL_OUTPUT); try { Thread.sleep(300); // *&^ing alarm } catch (InterruptedException e) { LOG.error(e); } UIUtil.dispatchAllInvocationEvents(); //flush }); checkDaemonReaction(false, () -> { consoleView.setOutputPaused(true); try { Thread.sleep(300); // *&^ing alarm } catch (InterruptedException e) { LOG.error(e); } UIUtil.dispatchAllInvocationEvents(); //flush }); } finally { Disposer.dispose(consoleView); } }