@Test
  public void testGetAndIncrementCounter() {
    addAllTestRecords();
    assertThat((int) accountDb.getCounter(index("maryweiss@yahoo.com", null))).isEqualTo(0);
    accountDb.incrementCounter(index("maryweiss@yahoo.com", null));
    assertThat((int) accountDb.getCounter(index("maryweiss@yahoo.com", null))).isEqualTo(1);
    // non-existent record
    assertThat(accountDb.getCounter(index("MARYwinehouse@yahoo.com", null))).isNull();
    // TOTP record
    assertThat((int) accountDb.getCounter(index("amywinehouse@aol.com", null))).isEqualTo(0);

    for (TestAccount t : TEST_ACCOUNTS_WITH_ISSUER) {
      if (t.type == OtpType.HOTP) {
        assertThat(accountDb.getCounter(t)).isEqualTo(t.counter);
      }
    }
  }
A list of {@link TestAccount}s that all have issuers.
javatests/com/google/android/apps/authenticator/otp/AccountDbTest.java