@Test
public void clickingChangeView_thenClickingShowAll_sendsAnalyticsEvent() {

    InstanceUploaderListActivity activity = Robolectric.setupActivity(InstanceUploaderListActivity.class);
    activity.onOptionsItemSelected(new RoboMenuItem(R.id.menu_change_view));
    AlertDialog dialog = ShadowAlertDialog.getLatestAlertDialog();
    shadowOf(dialog).clickOnItem(1);
    verify(analytics).logEvent("FilterSendForms", "SentAndUnsent");
}