void () { myFixture.enableInspections(new SpellCheckingInspection()); var customization = SpellCheckingEditorCustomizationProvider.getInstance().getEnabledCustomization(); assertNotNull(customization); var field = EditorTextFieldProvider.getInstance().getEditorField(PlainTextLanguage.INSTANCE, getProject(), Set.of(customization)); field.addNotify(); disposeOnTearDown(() -> field.removeNotify()); var document = field.getEditor().getDocument(); WriteCommandAction.runWriteCommandAction(getProject(), () -> document.setText("A <TYPO descr=\"Typo: In word 'misake'\">misake</TYPO>")); myFixture.configureFromExistingVirtualFile(FileDocumentManager.getInstance().getFile(document)); myFixture.checkHighlighting(); }