void () { LanguageExtensionPoint<Annotator> extension = new LanguageExtensionPoint<>("TEXT", new TestAnnotator()); extension.setPluginDescriptor(new DefaultPluginDescriptor("DocumentMarkupModelTest")); ExtensionTestUtil.maskExtensions(LanguageAnnotators.EP_NAME, Collections.singletonList(extension), myFixture.getTestRootDisposable()); myFixture.configureByText(PlainTextFileType.INSTANCE, "foo"); EditorColorsScheme scheme = new EditorColorsSchemeImpl(new DefaultColorsScheme()){{initFonts();}}; scheme.setAttributes(HighlighterColors.TEXT, new TextAttributes(Color.black, Color.white, null, null, Font.PLAIN)); ((EditorEx)myFixture.getEditor()).setColorsScheme(scheme); myFixture.doHighlighting(); MarkupModel model = DocumentMarkupModel.forDocument(myFixture.getEditor().getDocument(), getProject(), false); RangeHighlighter[] highlighters = model.getAllHighlighters(); assertThat(highlighters).hasSize(1); TextAttributes attributes = highlighters[0].getTextAttributes(scheme); assertThat(attributes).isNotNull(); assertThat(attributes.getBackgroundColor()).isNull(); assertThat(attributes.getForegroundColor()).isNull(); }