void (String @NotNull [] textToPrint, @NotNull String expectedText) { myConsole.clear(); myConsole.waitAllRequests(); assertEquals("", myConsole.getText()); for (String text : textToPrint) { myConsole.print(text, ConsoleViewContentType.NORMAL_OUTPUT); } myConsole.flushDeferredText(); assertEquals(expectedText, myConsole.getText()); myConsole.clear(); myConsole.waitAllRequests(); assertEquals("", myConsole.getText()); for (String text : textToPrint) { myConsole.print(text, ConsoleViewContentType.NORMAL_OUTPUT); myConsole.flushDeferredText(); } assertEquals(expectedText, myConsole.getText()); }