void (@NotNull final ActionHint actionHint, @NotNull final String testFullPath, @NotNull final String testName) { CodeInsightWorkspaceSettings.getInstance(getProject()).setOptimizeImportsOnTheFly(false, getTestRootDisposable()); IntentionAction action = findActionAndCheck(actionHint, testFullPath); if (action != null) { action.invoke(getProject(), getEditor(), getFile()); assertTrue(CodeInsightWorkspaceSettings.getInstance(getProject()).isOptimizeImportsOnTheFly()); } }