### Question:
AccountsManager { private boolean isExpired() { return isExpired(getNow(), timestamp); } AccountsManager(); @VisibleForTesting  AccountsManager(SharedPreferences sharedPreferences, boolean isManaged);   }### Answer:
@Test public void testIsExpired() { long now = AccountsManager.getNow(); long defaultValue = 0L; long tooOld = now - DateUtils.HOUR_IN_MILLIS - 1; long futureValue = now + 1; long immediatePast = now - 1; assertTrue(AccountsManager.isExpired(now, defaultValue)); assertTrue(AccountsManager.isExpired(now, tooOld)); assertFalse(AccountsManager.isExpired(now, futureValue)); assertFalse(AccountsManager.isExpired(now, immediatePast)); }