public void doTestRenameToExistingNameFails(String issuer) {
    String accountName1 = "johndoe@gmail.com";
    AccountIndex index1 = index(accountName1, issuer);
    String accountName2 = "another@dasher.com";
    AccountIndex index2 = index(accountName2, issuer);

    accountDb.add(accountName1, SECRET, OtpType.TOTP, 5, true, issuer);
    accountDb.add(accountName2, SECRET, OtpType.HOTP, 3, false, issuer);

    // Verify that the rename attempt fails and does not change the database
    assertThat(accountDb.rename(index1, accountName2)).isFalse();
    assertThat(accountDb.getAccounts()).containsExactly(index1, index2);
    boolean expectGoogleAccount1 = (issuer == null) || issuer.equals(GOOGLE_ISSUER);
    boolean expectGoogleAccount2 = (issuer != null) && issuer.equals(GOOGLE_ISSUER);
    validateAccountRecord(index1, SECRET, OtpType.TOTP, 5, expectGoogleAccount1);
    validateAccountRecord(index2, SECRET, OtpType.HOTP, 3, expectGoogleAccount2);
  }
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