void () { AnAction action = ActionManager.getInstance().getAction(IdeActions.ACTION_COPY); JPanel component = new JPanel(); action.registerCustomShortcutSet(CustomShortcutSet.EMPTY, component); assertWarningShown(true); }