void () { myFixture.configureByText(JavaFileType.INSTANCE, """ class X { void f() {<caret> } }"""); List<LogEvent> events = collectFUSEvents(() -> assertEmpty(myFixture.doHighlighting(HighlightSeverity.ERROR))); boolean highlightingCompletedExists = events.stream() .filter(e -> e.getGroup().getId().equals(DaemonFusCollector.GROUP.getId())) .filter(e -> e.getEvent().getId().equals(DaemonFusCollector.FINISHED.getEventId())) .anyMatch(e -> e.getEvent().getData().get(DaemonFusCollector.HIGHLIGHTING_COMPLETED.getName()) == Boolean.TRUE); assertTrue("There must be an event with highlighting_completed=true", highlightingCompletedExists); List<LogEvent> events2 = collectFUSEvents(() -> { myFixture.type("xxx//"); assertNotEmpty(myFixture.doHighlighting(HighlightSeverity.ERROR)); }); boolean highlightingCompletedExistsAfterTyping = events.stream() .filter(e -> e.getGroup().getId().equals(DaemonFusCollector.GROUP.getId())) .filter(e -> e.getEvent().getId().equals(DaemonFusCollector.FINISHED.getEventId())) .anyMatch(e -> e.getEvent().getData().get(DaemonFusCollector.HIGHLIGHTING_COMPLETED.getName()) == Boolean.TRUE); assertTrue("There must be an event with highlighting_completed=true after typing", highlightingCompletedExistsAfterTyping); List<LogEvent> events3 = collectFUSEvents(() -> { DaemonCodeAnalyzer.getInstance(myFixture.getProject()).restart(); assertNotEmpty(myFixture.doHighlighting(HighlightSeverity.ERROR)); }); boolean highlightingIsNotReportedAfterMeaninglessRestart = events3.stream() .filter(e -> e.getGroup().getId().equals(DaemonFusCollector.GROUP.getId())) .filter(e -> e.getEvent().getId().equals(DaemonFusCollector.FINISHED.getEventId())) .noneMatch(e -> e.getEvent().getData().get(DaemonFusCollector.HIGHLIGHTING_COMPLETED.getName()) == Boolean.TRUE); assertTrue("highlighting_completed=true should not be reported after meaningless restart", highlightingIsNotReportedAfterMeaninglessRestart); }