@Test public void testDelete_registeredFID_successful() throws Exception { persistedInstallation.insertOrUpdatePersistedInstallationEntry( PersistedInstallationEntry.INSTANCE.withRegisteredFid( TEST_FID_1, TEST_REFRESH_TOKEN, utils.currentTimeInSecs(), TEST_AUTH_TOKEN, TEST_TOKEN_EXPIRATION_TIMESTAMP)); when(mockBackend.createFirebaseInstallation( anyString(), anyString(), anyString(), anyString(), any())) .thenReturn(TEST_INSTALLATION_RESPONSE); TestOnCompleteListener<Void> onCompleteListener = new TestOnCompleteListener<>(); firebaseInstallations.delete().addOnCompleteListener(executor, onCompleteListener); onCompleteListener.await(); PersistedInstallationEntry entryValue = persistedInstallation.readPersistedInstallationEntryValue(); assertEquals(entryValue.getRegistrationStatus(), RegistrationStatus.NOT_GENERATED); verify(mockBackend, times(1)) .deleteFirebaseInstallation(TEST_API_KEY, TEST_FID_1, TEST_PROJECT_ID, TEST_REFRESH_TOKEN); }
@NonNull @Override public Task<Void> delete() { return Tasks.call(backgroundExecutor, this::deleteFirebaseInstallationId); }
FirebaseInstallations implements FirebaseInstallationsApi { @NonNull @Override public Task<Void> delete() { return Tasks.call(backgroundExecutor, this::deleteFirebaseInstallationId); } }
FirebaseInstallations implements FirebaseInstallationsApi { @NonNull @Override public Task<Void> delete() { return Tasks.call(backgroundExecutor, this::deleteFirebaseInstallationId); } FirebaseInstallations(
      FirebaseApp firebaseApp,
      @NonNull Provider<UserAgentPublisher> publisher,
      @NonNull Provider<HeartBeatInfo> heartbeatInfo);   FirebaseInstallations(
      ExecutorService backgroundExecutor,
      FirebaseApp firebaseApp,
      FirebaseInstallationServiceClient serviceClient,
      PersistedInstallation persistedInstallation,
      Utils utils,
      IidStore iidStore,
      RandomFidGenerator fidGenerator); }
FirebaseInstallations implements FirebaseInstallationsApi { @NonNull @Override public Task<Void> delete() { return Tasks.call(backgroundExecutor, this::deleteFirebaseInstallationId); } FirebaseInstallations(
      FirebaseApp firebaseApp,
      @NonNull Provider<UserAgentPublisher> publisher,
      @NonNull Provider<HeartBeatInfo> heartbeatInfo);   FirebaseInstallations(
      ExecutorService backgroundExecutor,
      FirebaseApp firebaseApp,
      FirebaseInstallationServiceClient serviceClient,
      PersistedInstallation persistedInstallation,
      Utils utils,
      IidStore iidStore,
      RandomFidGenerator fidGenerator); @NonNull static FirebaseInstallations getInstance(); @NonNull static FirebaseInstallations getInstance(@NonNull FirebaseApp app); @NonNull @Override Task<String> getId(); @NonNull @Override Task<InstallationTokenResult> getToken(boolean forceRefresh); @NonNull @Override Task<Void> delete(); }
FirebaseInstallations implements FirebaseInstallationsApi { @NonNull @Override public Task<Void> delete() { return Tasks.call(backgroundExecutor, this::deleteFirebaseInstallationId); } FirebaseInstallations(
      FirebaseApp firebaseApp,
      @NonNull Provider<UserAgentPublisher> publisher,
      @NonNull Provider<HeartBeatInfo> heartbeatInfo);   FirebaseInstallations(
      ExecutorService backgroundExecutor,
      FirebaseApp firebaseApp,
      FirebaseInstallationServiceClient serviceClient,
      PersistedInstallation persistedInstallation,
      Utils utils,
      IidStore iidStore,
      RandomFidGenerator fidGenerator); @NonNull static FirebaseInstallations getInstance(); @NonNull static FirebaseInstallations getInstance(@NonNull FirebaseApp app); @NonNull @Override Task<String> getId(); @NonNull @Override Task<InstallationTokenResult> getToken(boolean forceRefresh); @NonNull @Override Task<Void> delete();  }