void () { @NonNls String text = "package x; class S { void f(ReadLock r){} } <caret> "; configureByText(text); CodeInsightSettings.getInstance().ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY = true; List<HighlightInfo> errs = highlightErrors(); assertEquals(1, errs.size()); assertNoImportsAdded(); type("/* */"); doHighlighting(); UIUtil.dispatchAllInvocationEvents(); assertNoImportsAdded(); }