### Question:
HeartBeatInfoStorage { synchronized boolean shouldSendGlobalHeartBeat(long millis) { return shouldSendSdkHeartBeat(GLOBAL, millis); } private  HeartBeatInfoStorage(Context applicationContext); @VisibleForTesting @RestrictTo(RestrictTo.Scope.TESTS)  HeartBeatInfoStorage(SharedPreferences preferences);   }### Answer:
@Test public void shouldSendGlobalHeartBeat_answerIsNo() { sharedPreferences.edit().putLong(GLOBAL, 1).apply(); assertThat(heartBeatInfoStorage.shouldSendGlobalHeartBeat(1)).isFalse(); }
@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); }