void () { ConsoleViewImpl console = myConsole; console.print("Initial", ConsoleViewContentType.NORMAL_OUTPUT); console.flushDeferredText(); console.clear(); console.print("Hi", ConsoleViewContentType.NORMAL_OUTPUT); console.waitAllRequests(); UIUtil.dispatchAllInvocationEvents(); assertEquals(2, console.getContentSize()); }