### Question:
RerunState extends ValueObject { public boolean isExpired(ScheduledTime now) { return rerunTime.plusDays(EXPIRATION_DAYS).getDateTime().isBefore(now.getDateTime()); } RerunState(ScheduledTime rerunTime); ScheduledTime getRerunTime(); boolean isExpired(ScheduledTime now); ObjectNode toJSONNode(); static RerunState fromJSONNode(ObjectNode node); static final int EXPIRATION_DAYS; }### Answer:
@Test public void testExpiration() { RerunState st = new RerunState(new ScheduledTime("2015-09-07T00:00Z")); Assert.assertTrue(st.isExpired(new ScheduledTime("2015-10-07T00:00Z"))); Assert.assertFalse(st.isExpired(new ScheduledTime("2015-09-14T00:00Z"))); Assert.assertFalse(st.isExpired(new ScheduledTime("2014-09-14T00:00Z"))); }