void () { enableInspections(); Function<PsiFile, Generator<? extends MadTestingAction>> fileActions = file -> Generator.sampledFrom(new InvokeIntentionAtElement(file, new JavaIntentionPolicy() { @Override protected boolean shouldSkipIntention(@NotNull String actionText) { return !actionText.equals(JavaAnalysisBundle.message("inspection.redundant.cast.remove.quickfix")); } }, PsiTypeCastExpression.class, Function.identity()), new InsertTypeCastCommand(file)); PropertyChecker .checkScenarios(actionsOnJavaFiles(fileActions)); }