@Override
          public Void call() {
            // Use performLongClick instead of showContextMenu to exercise more of the code path
            // that
            // is invoked when the user normally opens a context menu.
            if (!view.performLongClick()) {
              throw new RuntimeException("Failed to perform long click");
            }
            if (!activity.getWindow().performContextMenuIdentifierAction(itemId, 0)) {
              throw new RuntimeException("Failed perform to context menu action");
            }
            return null;
          }
Opens the context menu for the provided {@link View} and invokes the menu item with the
provided ID.

<p>Note: This method cannot be invoked on the main thread.
javatests/com/google/android/apps/authenticator/testing/TestUtilities.java