void () { Set<Editor> applied = ConcurrentCollectionFactory.createConcurrentSet(); Set<Editor> collected = ConcurrentCollectionFactory.createConcurrentSet(); registerFakePass(applied, collected); configureByText(PlainTextFileType.INSTANCE, ""); Editor editor1 = getEditor(); Editor editor2 = EditorFactory.getInstance().createEditor(editor1.getDocument(),getProject()); Disposer.register(getProject(), () -> EditorFactory.getInstance().releaseEditor(editor2)); TextEditor textEditor1 = new PsiAwareTextEditorProvider().getTextEditor(editor1); TextEditor textEditor2 = new PsiAwareTextEditorProvider().getTextEditor(editor2); myDaemonCodeAnalyzer.runPasses(myFile, editor1.getDocument(), textEditor1, new int[0], false, null); myDaemonCodeAnalyzer.runPasses(myFile, editor1.getDocument(), textEditor2, new int[0], false, null); List<HighlightInfo> errors = DaemonCodeAnalyzerImpl.getHighlights(editor1.getDocument(), null, myProject); assertEmpty(errors); assertEquals(collected, ContainerUtil.newHashSet(editor1, editor2)); assertEquals(applied, ContainerUtil.newHashSet(editor1, editor2)); }