public void doTestRenameToSameName(String issuer) {
    String accountName = "johndoe@gmail.com";
    AccountIndex index = index(accountName, issuer);
    boolean expectGoogleAccount = (issuer == null) || issuer.equals(GOOGLE_ISSUER);
    accountDb.add(accountName, SECRET, OtpType.TOTP, 5, true, issuer);
    assertThat(accountDb.getAccounts()).containsExactly(index).inOrder();
    validateAccountRecord(index, SECRET, OtpType.TOTP, 5, expectGoogleAccount);

    assertThat(accountDb.rename(index, accountName)).isTrue();
    assertThat(accountDb.getAccounts()).containsExactly(index).inOrder();
    validateAccountRecord(index, SECRET, OtpType.TOTP, 5, 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