@Test public void testOutdatedAuthTokenExpiration() { AuthToken token = spy(new AuthToken("token_value")); final int SPENT_FUTURE_DAYS = 30; setCurrentDateInFuture(token, SPENT_FUTURE_DAYS); assert token.isExpired(); }
public boolean isExpired() { return now().getTime() - receivedAt.getTime() > DAYS.toMillis(10); }
AuthToken { public boolean isExpired() { return now().getTime() - receivedAt.getTime() > DAYS.toMillis(10); } }
AuthToken { public boolean isExpired() { return now().getTime() - receivedAt.getTime() > DAYS.toMillis(10); } AuthToken(String value); }
AuthToken { public boolean isExpired() { return now().getTime() - receivedAt.getTime() > DAYS.toMillis(10); } AuthToken(String value); String getValue(); Date getReceivedAt(); boolean isExpired(); String toHeaderString(); }
AuthToken { public boolean isExpired() { return now().getTime() - receivedAt.getTime() > DAYS.toMillis(10); } AuthToken(String value); String getValue(); Date getReceivedAt(); boolean isExpired(); String toHeaderString();  }