void () { HyperlinkInfo predefinedHyperlink = project -> {}; Filter predefinedFilter = (line, entireLength) -> new Filter.Result(0, 1, predefinedHyperlink); HyperlinkInfo customHyperlink = project -> {}; Filter customFilter = (line, entireLength) -> new Filter.Result(0, 10, customHyperlink); Disposer.dispose(myConsole); // have to re-init extensions ConsoleFilterProvider predefinedProvider = project -> new Filter[] { predefinedFilter }; ExtensionTestUtil.maskExtensions( ConsoleFilterProvider.FILTER_PROVIDERS, List.of(predefinedProvider), getTestRootDisposable()); myConsole = createConsole(true, getProject()); myConsole.addMessageFilter(customFilter); myConsole.print("foo bar buz test", ConsoleViewContentType.NORMAL_OUTPUT); myConsole.flushDeferredText(); myConsole.waitAllRequests(); EditorHyperlinkSupport hyperlinks = myConsole.getHyperlinks(); assertNotNull(hyperlinks.getHyperlinkAt(0)); assertEquals(customHyperlink, hyperlinks.getHyperlinkAt(0)); assertNotNull(hyperlinks.getHyperlinkAt(10)); assertEquals(customHyperlink, hyperlinks.getHyperlinkAt(10)); }