@TargetApi(11)
  private static void openListViewContextualActionBarAndInvokeItem(
      AuthenticatorActivity activity,
      final ListView listView,
      final int position,
      final int menuItemId) {
    ActionMode actionMode =
        (ActionMode) openListViewContextualActionBar(activity, listView, position);
    MenuItem menuItem = actionMode.getMenu().findItem(menuItemId);
    try {
      onView(withContentDescription(menuItem.getTitle().toString())).perform(click());
    } catch (NoMatchingViewException e) {
      // Might be in the overflow menu
      Espresso.openActionBarOverflowOrOptionsMenu(activity);
      onView(withText(menuItem.getTitle().toString())).perform(click());
    }
  }
This function return the original pin code from the styled pin code, which may has a space in
the middle of the string

@param pin The styled pin code
@return The original pin code with no spaces
javatests/com/google/android/apps/authenticator/AuthenticatorActivityTest.java