It’s fairly simple to simulate a button click in Robolectric:
Button someButton = (Button) findViewById(R.id.some_button);
someButton.performClick();
However, I can’t seem to figure out how to do the same thing with a menu item. I create a menu in Activity.onCreateOptionsMenu, how can I simulate a click on one of its items?
Enjoy!