void () { configureByText(JavaFileType.INSTANCE, "class X { int f = \"error\"; int f() { int gg<caret> = 11; return 0;} }"); HighlightInfo error = assertOneElement(highlightErrors()); assertEquals("Incompatible types. Found: 'java.lang.String', required: 'int'", error.getDescription()); error.getHighlighter().dispose(); assertEmpty(highlightErrors()); type("23"); assertEmpty(highlightErrors()); myEditor.getCaretModel().moveToOffset(0); type("/* */"); HighlightInfo error2 = assertOneElement(highlightErrors()); assertEquals("Incompatible types. Found: 'java.lang.String', required: 'int'", error2.getDescription()); }