void (Project project, Editor editor, String intentionString, IntentionPolicy policy) { List<HighlightInfo> errors = ContainerUtil.filter(highlightErrors(project, editor), info -> policy.shouldTolerateIntroducedError(info)); if (!errors.isEmpty()) { throw new AssertionError("New highlighting errors introduced after invoking " + intentionString + "\nIf this is correct, add it to IntentionPolicy#mayBreakCode." + "\nErrors found: " + StringUtil.join(errors, InvokeIntention::shortInfoText, ",")); } }