Android testing context menu
<p>I am trying to test my activity using either ActivityUnitTestCase or ActivityInstrumentationTestCase2. In the activity I want to test my</p>

<pre><code>public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
        menu.setHeaderTitle(R.string.lcMenuHeader);

        menu.add(Menu.NONE, EDIT_MENU_POS, EDIT_MENU_POS, R.string.lcEditAccount);
        menu.add(Menu.NONE, COPY_MENU_POS, COPY_MENU_POS, R.string.lcCopyAccount);
        menu.add(Menu.NONE, DELETE_MENU_POS, DELETE_MENU_POS, R.string.lcDeleteAccount);
}
</code></pre>

<p>How can I test that the menu is in the right state - ie. 3 items and a given header? I can trigger it being created in my ActivityInstrumentationTestCase2 test using </p>

<pre><code>textView.performLongClick();
</code></pre>

<p>But I don't know how to get it back.</p>

<p>Thanks
Stephen</p>
