void () { myConsole.print("Ready\n\bSet\b\b\b\b\bSteady\n", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.print("\b\b\bGo", ConsoleViewContentType.ERROR_OUTPUT); myConsole.print("token1", ConsoleViewContentType.SYSTEM_OUTPUT); myConsole.print("\b\b\b\btoken2\bX\n", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.print("temp", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.print("\b\b\b\b\b\b\b\b\b", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.print("_", ConsoleViewContentType.SYSTEM_OUTPUT); myConsole.print("Done", ConsoleViewContentType.SYSTEM_OUTPUT); myConsole.flushDeferredText(); assertEquals("Ready\nSteady\nGototokenX\n_Done", myConsole.getText()); assertMarkersEqual(getAllRangeHighlighters(), new ExpectedHighlighter(0, 13, ConsoleViewContentType.NORMAL_OUTPUT), // Ready\nSteady\n new ExpectedHighlighter(13, 15, ConsoleViewContentType.ERROR_OUTPUT), // Go new ExpectedHighlighter(15, 17, ConsoleViewContentType.SYSTEM_OUTPUT), // to new ExpectedHighlighter(17, 24, ConsoleViewContentType.NORMAL_OUTPUT), // tokenX\n new ExpectedHighlighter(24, 29, ConsoleViewContentType.SYSTEM_OUTPUT) // Done ); }