void () { final List<IntentionAction> fixes = myFixture.getAllQuickFixes("ApplyRenameForWholeFile.java"); fixes .stream() .filter(i -> JavaI18nBundle.message("inspection.duplicates.replace.family.quickfix").equals(i.getFamilyName())) .forEach(action -> { myFixture.launchAction(action); NonBlockingReadActionImpl.waitForAsyncTaskCompletion(); }); myFixture.checkResultByFile("ApplyRenameForWholeFileAfter.java"); }