@SuppressWarnings("unchecked")
  public void testNewConversationWithUnknownWhenUnregistered() throws Exception {
    loadActivity(ConversationListActivity.class, STATE_REGISTRATION_SKIPPED);
    clickNewConversation();

    NewConversationActivityActions.filterNameOrNumber("8888888888");
    NewConversationActivityActions.clickContactWithNumber("8888888888");
    EspressoUtil.waitOn(ConversationActivity.class);
  }
  public void testNewConversationWithNonPushContact() throws Exception {
    populateContacts();
    loadActivity(ConversationListActivity.class, STATE_REGISTERED);
    clickNewConversation();

    NewConversationActivityActions.clickContactWithName("Chairman Meow");
    EspressoUtil.waitOn(ConversationActivity.class);
  }
  // this is known to fail on some devices, see #2378
  @SuppressWarnings("unchecked")
  public void testContactFilterPostfix() throws Exception {
    populateContacts();
    loadActivity(ConversationListActivity.class, STATE_REGISTERED);
    clickNewConversation();

    for (String[] TEST_CONTACT : TEST_CONTACTS) {
      NewConversationActivityActions.filterNameOrNumber(TEST_CONTACT[4]);
      onView(allOf(withId(R.id.name), withText(TEST_CONTACT[0]))).check(matches(isDisplayed()));
    }
  }