IntentionAction (@NotNull String name) { List<IntentionAction> intentions = myFixture.getAvailableIntentions(); Optional<IntentionAction> intention = intentions.stream().filter(it -> it.getText().contains(name)).findFirst(); assert intention.isPresent(); return intention.get(); }