public void doTestUpdate(String issuer) {
    String accountName = "johndoe@dasher.com";
    AccountIndex index = index(accountName, issuer);
    boolean expectGoogleAccount = (issuer == null) || issuer.equals(GOOGLE_ISSUER);
    // Add the account as a "Google Account", but that flag is only respected for null issuer
    accountDb.add(accountName, SECRET, OtpType.HOTP, 3, true, issuer);
    assertThat(accountDb.getAccounts()).containsExactly(index).inOrder();
    validateAccountRecord(index, SECRET, OtpType.HOTP, 3, expectGoogleAccount);

    // Now update the account overwriting the existing entry, except for the
    // "is Google Account" flag which should be preserved.
    accountDb.update(index, SECRET2, OtpType.TOTP, 7, null);
    assertThat(accountDb.getAccounts()).containsExactly(index).inOrder();
    validateAccountRecord(index, SECRET2, OtpType.TOTP, 7, expectGoogleAccount);

    // Update the account again, overwriting the existing entry, including the
    // "is Google Account" flag this time.
    expectGoogleAccount = (issuer != null) && issuer.equals(GOOGLE_ISSUER);
    accountDb.update(index, SECRET3, OtpType.TOTP, 1, false);
    assertThat(accountDb.getAccounts()).containsExactly(index).inOrder();
    validateAccountRecord(index, SECRET3, OtpType.TOTP, 1, expectGoogleAccount);
  }
Note: caller should carefully determine the expected value of {@code isGoogleAccount}, which
is affected by multiple factors.

@param isGoogleAccount is a {@code boolean}, not a {@link Boolean}
javatests/com/google/android/apps/authenticator/otp/AccountDbTest.java