@Test public void shouldSendGlobalHeartBeat_answerIsYes() { long currentTime = System.currentTimeMillis(); assertThat(heartBeatInfoStorage.shouldSendGlobalHeartBeat(1)).isTrue(); assertThat(sharedPreferences.getLong(GLOBAL, -1)).isEqualTo(1); assertThat(heartBeatInfoStorage.shouldSendGlobalHeartBeat(currentTime)).isTrue(); assertThat(sharedPreferences.getLong(GLOBAL, -1)).isEqualTo(currentTime); }
synchronized boolean shouldSendGlobalHeartBeat(long millis) { return shouldSendSdkHeartBeat(GLOBAL, millis); }
HeartBeatInfoStorage { synchronized boolean shouldSendGlobalHeartBeat(long millis) { return shouldSendSdkHeartBeat(GLOBAL, millis); } }
HeartBeatInfoStorage { synchronized boolean shouldSendGlobalHeartBeat(long millis) { return shouldSendSdkHeartBeat(GLOBAL, millis); } private  HeartBeatInfoStorage(Context applicationContext); @VisibleForTesting @RestrictTo(RestrictTo.Scope.TESTS)  HeartBeatInfoStorage(SharedPreferences preferences); }
HeartBeatInfoStorage { synchronized boolean shouldSendGlobalHeartBeat(long millis) { return shouldSendSdkHeartBeat(GLOBAL, millis); } private  HeartBeatInfoStorage(Context applicationContext); @VisibleForTesting @RestrictTo(RestrictTo.Scope.TESTS)  HeartBeatInfoStorage(SharedPreferences preferences);  }
HeartBeatInfoStorage { synchronized boolean shouldSendGlobalHeartBeat(long millis) { return shouldSendSdkHeartBeat(GLOBAL, millis); } private  HeartBeatInfoStorage(Context applicationContext); @VisibleForTesting @RestrictTo(RestrictTo.Scope.TESTS)  HeartBeatInfoStorage(SharedPreferences preferences);   }