### Question:
Tokens { public boolean isAccessTokenExpired() { if (mAccessToken == null || mIdToken == null) { return true; } return System.currentTimeMillis() > mExpiresAt; } Tokens(String idToken, String accessToken, String refreshToken, int expiresIn, String[] scope,
            long expiresAt); @RestrictTo(RestrictTo.Scope.LIBRARY)  Tokens(@NonNull TokenResponse response); @Nullable String getIdToken(); @Nullable String getAccessToken(); @Nullable String getRefreshToken(); int getExpiresIn(); @Nullable String[] getScope(); boolean isAccessTokenExpired();  }### Answer:
@Test public void isAccessTokenExpiredSuccess() { Tokens tokens = new Tokens(ID_TOKEN, ACCESS_TOKEN, REFRESH_TOKEN, VALID_EXPIRES_IN, VALID_SCOPES, System.currentTimeMillis()); assertFalse(tokens.isAccessTokenExpired()); }
@Test public void isAccessTokenExpiredFailure() throws InterruptedException { Tokens tokens = new Tokens(ID_TOKEN, ACCESS_TOKEN, REFRESH_TOKEN, 1, VALID_SCOPES, System.currentTimeMillis()); Thread.sleep(1000); assertTrue(tokens.isAccessTokenExpired()); }