shadows/framework/src/main/java/org/robolectric/shadows/ShadowActivity.java
public boolean clickMenuItem(int menuItemResId) {
    final RoboMenuItem item = new RoboMenuItem(menuItemResId);
    return realActivity.onMenuItemSelected(Window.FEATURE_OPTIONS_PANEL, item);
  }
public boolean clickMenuItem(int menuItemResId) {
    final RoboMenuItem item = new RoboMenuItem(menuItemResId);
    return realActivity.onMenuItemSelected(Window.FEATURE_OPTIONS_PANEL, item);
  }
public boolean clickMenuItem ( int menuItemResId ) { final RoboMenuItem item = new RoboMenuItem ( menuItemResId ) ; return realActivity . onMenuItemSelected ( Window . FEATURE_OPTIONS_PANEL , item ) ; }
Perform a click on a menu item.

@param menuItemResId Menu item resource ID.
@return True if the click was handled, false otherwise.
Perform a click on a menu item .