// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.firebase.functions;

import androidx.annotation.Nullable;
import com.google.firebase.iid.internal.FirebaseInstanceIdInternal;

public class TestFirebaseInstanceIdInternal implements FirebaseInstanceIdInternal {
  private final String testToken;

  public TestFirebaseInstanceIdInternal(String testToken) {
    this.testToken = testToken;
  }

  @Override
  public String getId() {
    throw new UnsupportedOperationException();
  }

  @Nullable
  @Override
  public String getToken() {
    return testToken;
  }
}

@@ -650,23 +650,144 @@
 tation.N
-ullable
+onNull;%0Aimport androidx.annotation.Nullable;%0Aimport com.google.android.gms.tasks.Task;%0Aimport com.google.android.gms.tasks.Tasks
 ;%0Aimport
@@ -847,16 +847,44 @@
 nternal;
+%0Aimport java.io.IOException;
 %0A%0Apublic
@@ -1232,24 +1232,24 @@
 etToken() %7B%0A
-
     return t
@@ -1261,11 +1261,418 @@
 ken;%0A  %7D
+%0A%0A  @NonNull%0A  @Override%0A  public Task%3CString%3E getTokenTask() %7B%0A    return Tasks.forResult(testToken);%0A  %7D%0A%0A  @Override%0A  public void deleteToken(@NonNull String s, @NonNull String s1) throws IOException %7B%0A    // No-op: We're not using this method in our tests%0A  %7D%0A%0A  @Override%0A  public void addNewTokenListener(NewTokenListener newTokenListener) %7B%0A    // No-op: We're not using this method in our tests%0A  %7D
 %0A%7D%0A

fix instrumentation tests (#4249)