void () { myConsole.print("Starting\n", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.print("Hello", ConsoleViewContentType.ERROR_OUTPUT); myConsole.print("\b\b\b\bDone", ConsoleViewContentType.SYSTEM_OUTPUT); myConsole.flushDeferredText(); assertEquals("Starting\nHDone", myConsole.getText()); List<RangeHighlighter> actualHighlighters = getAllRangeHighlighters(); assertMarkersEqual(actualHighlighters, new ExpectedHighlighter(0, 9, ConsoleViewContentType.NORMAL_OUTPUT), new ExpectedHighlighter(9, 10, ConsoleViewContentType.ERROR_OUTPUT), new ExpectedHighlighter(10, 14, ConsoleViewContentType.SYSTEM_OUTPUT) ); }