title: Android testing menu content
body: <p>I create menu just like tutorial says.</p>
  
  <pre><code>@Override
  public boolean onCreateOptionsMenu(Menu menu) {
      MenuInflater inflater = getMenuInflater();
      inflater.inflate(R.menu.game_menu, menu);
      return true;
  }
  </code></pre>
  
  <p>I want to write a JUnit test that checks if menu items strings are correct. However I don't know how can I do something like getMenu() from outside MainActivity class and then get menu items to strings or a list. Also I can't declare field 'menu'. Thanks for help.</p>