void () { Disposer.dispose(myConsole); // have to re-init extensions ConsoleDependentInputFilterProvider filterProvider = new ConsoleDependentInputFilterProvider() { @Override public @NotNull List<InputFilter> getDefaultFilters(@NotNull ConsoleView consoleView, @NotNull Project project, @NotNull GlobalSearchScope scope) { return List.of((text, contentType) -> Collections.singletonList(Pair.create("!" + text + "!", contentType))); } }; ExtensionTestUtil.maskExtensions( ConsoleInputFilterProvider.INPUT_FILTER_PROVIDERS, List.of(filterProvider), getTestRootDisposable()); myConsole = createConsole(true, getProject()); myConsole.print("Foo", ConsoleViewContentType.USER_INPUT); myConsole.print("Bar", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.print("Baz", ConsoleViewContentType.ERROR_OUTPUT); myConsole.flushDeferredText(); myConsole.waitAllRequests(); assertEquals("!Foo!!Bar!!Baz!", myConsole.getText()); }