void (Class<? extends IntentionAction> intentionType) { CaretModel caretModel = myFixture.getEditor().getCaretModel(); List<HighlightInfo> inspections = myFixture.doHighlighting(HighlightSeverity.WEAK_WARNING); while (!inspections.isEmpty()) { inspections.get(0).findRegisteredQuickFix((descriptor, range) -> { IntentionAction action = descriptor.getAction(); if (intentionType.isInstance(action)) { caretModel.moveToOffset(range.getStartOffset()); myFixture.launchAction(action); } return null; }); inspections = myFixture.doHighlighting(HighlightSeverity.WARNING); } }