### Question:
FirebaseRemoteConfig { public long getLong(@NonNull String key) { return getHandler.getLong(key); } FirebaseRemoteConfig(
      Context context,
      FirebaseApp firebaseApp,
      FirebaseInstallationsApi firebaseInstallations,
      @Nullable FirebaseABTesting firebaseAbt,
      Executor executor,
      ConfigCacheClient fetchedConfigsCache,
      ConfigCacheClient activatedConfigsCache,
      ConfigCacheClient defaultConfigsCache,
      ConfigFetchHandler fetchHandler,
      ConfigGetParameterHandler getHandler,
      ConfigMetadataClient frcMetadata); @NonNull static FirebaseRemoteConfig getInstance(); @NonNull static FirebaseRemoteConfig getInstance(@NonNull FirebaseApp app); @NonNull Task<FirebaseRemoteConfigInfo> ensureInitialized(); @NonNull Task<Boolean> fetchAndActivate(); @Deprecated @WorkerThread boolean activateFetched(); @NonNull Task<Boolean> activate(); @NonNull Task<Void> fetch(); @NonNull Task<Void> fetch(long minimumFetchIntervalInSeconds); @NonNull String getString(@NonNull String key); boolean getBoolean(@NonNull String key); @NonNull @Deprecated byte[] getByteArray(@NonNull String key); double getDouble(@NonNull String key); long getLong(@NonNull String key); @NonNull FirebaseRemoteConfigValue getValue(@NonNull String key); @NonNull Set<String> getKeysByPrefix(@NonNull String prefix); @NonNull Map<String, FirebaseRemoteConfigValue> getAll(); @NonNull FirebaseRemoteConfigInfo getInfo(); @Deprecated void setConfigSettings(@NonNull FirebaseRemoteConfigSettings settings); @NonNull Task<Void> setConfigSettingsAsync(@NonNull FirebaseRemoteConfigSettings settings); @Deprecated void setDefaults(@NonNull Map<String, Object> defaults); @NonNull Task<Void> setDefaultsAsync(@NonNull Map<String, Object> defaults); @Deprecated void setDefaults(@XmlRes int resourceId); @NonNull Task<Void> setDefaultsAsync(@XmlRes int resourceId); @NonNull Task<Void> reset(); static final String DEFAULT_VALUE_FOR_STRING; static final long DEFAULT_VALUE_FOR_LONG; static final double DEFAULT_VALUE_FOR_DOUBLE; static final boolean DEFAULT_VALUE_FOR_BOOLEAN; static final byte[] DEFAULT_VALUE_FOR_BYTE_ARRAY; static final int VALUE_SOURCE_STATIC; static final int VALUE_SOURCE_DEFAULT; static final int VALUE_SOURCE_REMOTE; static final int LAST_FETCH_STATUS_SUCCESS; static final int LAST_FETCH_STATUS_NO_FETCH_YET; static final int LAST_FETCH_STATUS_FAILURE; static final int LAST_FETCH_STATUS_THROTTLED; static final String TAG; }### Answer:
@Test public void getLong_keyDoesNotExist_returnsDefaultValue() { when(mockGetHandler.getLong(LONG_KEY)).thenReturn(DEFAULT_VALUE_FOR_LONG); assertThat(frc.getLong(LONG_KEY)).isEqualTo(DEFAULT_VALUE_FOR_LONG); }
@Test public void getLong_keyExists_returnsRemoteValue() { long remoteValue = 555L; when(mockGetHandler.getLong(LONG_KEY)).thenReturn(remoteValue); assertThat(frc.getLong(LONG_KEY)).isEqualTo(remoteValue); }
@SuppressWarnings("deprecation") @Test public void getLong_fireperfNamespace_keyDoesNotExist_returnsDefaultValue() { when(mockFireperfGetHandler.getLong(LONG_KEY)).thenReturn(DEFAULT_VALUE_FOR_LONG); assertThat(fireperfFrc.getLong(LONG_KEY)).isEqualTo(DEFAULT_VALUE_FOR_LONG); }
@SuppressWarnings("deprecation") @Test public void getLong_fireperfNamespace_keyExists_returnsRemoteValue() { long remoteValue = 555L; when(mockFireperfGetHandler.getLong(LONG_KEY)).thenReturn(remoteValue); assertThat(fireperfFrc.getLong(LONG_KEY)).isEqualTo(remoteValue); }