@Test
  public void testRenamePreservesSourceFlagWithNullIssuer() {
    // The output of isGoogleAccount depends on the "source flag" and the name of the account.

    // Source flag explicitly set to "Google Account" -- isGoogleAccount should not depend on the
    // name
    accountDb.add("a@b.c", SECRET, OtpType.TOTP, null, true, null);
    assertThat(accountDb.isGoogleAccount(index("a@b.c", null))).isTrue();
    // Source flag not set explicitly -- for new accounts with null issuer, this implies they are
    // not Google accounts.
    accountDb.add("test@gmail.com", SECRET, OtpType.TOTP, null, null, null);
    assertThat(accountDb.isGoogleAccount(index("test@gmail.com", null))).isFalse();

    accountDb.rename(index("a@b.c", null), "b@a.c");
    accountDb.rename(index("test@gmail.com", null), "test@yahoo.com");
    assertThat(accountDb.isGoogleAccount(index("b@a.c", null))).isTrue();
    assertThat(accountDb.isGoogleAccount(index("test@yahoo.com", null))).isFalse();
  }
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