@Test
  public void testDelete() {
    addAllTestRecords();
    accountDb.delete(index("johndoe@gmail.com", null));
    assertThat(accountDb.getAccounts()).hasSize(TEST_ACCOUNTS.length - 1);
    assertThat(accountDb.indexExists(index("johndoe@gmail.com", null))).isFalse();
    // re-add johndoe.
    accountDb.add("johndoe@gmail.com", SECRET, OtpType.TOTP, null, null, null);
    assertThat(accountDb.indexExists(index("johndoe@gmail.com", null))).isTrue();
    assertThat(accountDb.getAccounts()).hasSize(TEST_ACCOUNTS.length);

    for (TestAccount t : TEST_ACCOUNTS) {
      accountDb.delete(t);
      assertThat(accountDb.getAccounts()).hasSize(TEST_ACCOUNTS.length - 1);
      addTestAccount(t); // Re-add the deleted account
      assertThat(accountDb.getAccounts()).hasSize(TEST_ACCOUNTS.length);
    }
  }
A list of {@link TestAccount}s that all have issuers.
javatests/com/google/android/apps/authenticator/otp/AccountDbTest.java