### Question:
OathTokenCode { public boolean isValid() { long cur = timeKeeper.getCurrentTimeMillis(); return cur < until; } protected  OathTokenCode(TimeKeeper timeKeeper, String code, long start, long until, OathMechanism.TokenType tokenType); String getCurrentCode(); long getStart(); long getUntil(); boolean isValid(); OathMechanism.TokenType getOathType(); int getProgress();  }### Answer:
@Test public void testShouldReportCorrectValidityBeforeAndAfterExpiry() { assertEquals(oathTokenCode.isValid(), true); timeKeeper.timeTravel(EXPIRY_DELAY); assertEquals(oathTokenCode.isValid(), false); }