void () { configureByText(JavaFileType.INSTANCE, "class S { void ffffff() {fff<caret>fff();}}"); assertEmpty(highlightErrors()); MarkupModel markup = DocumentMarkupModel.forDocument(myEditor.getDocument(), getProject(), true); TextRange[] highlightersBefore = getHighlightersTextRange(markup); type("%%%%"); assertNotEmpty(highlightErrors()); backspace(); backspace(); backspace(); backspace(); assertEmpty(highlightErrors()); TextRange[] highlightersAfter = getHighlightersTextRange(markup); assertEquals(highlightersBefore.length, highlightersAfter.length); for (int i = 0; i < highlightersBefore.length; i++) { TextRange before = highlightersBefore[i]; TextRange after = highlightersAfter[i]; assertEquals(before.getStartOffset(), after.getStartOffset()); assertEquals(before.getEndOffset(), after.getEndOffset()); } }