### Question:
CronExpression implements Serializable, Cloneable { public Date getNextValidTimeAfter(Date date) { return getTimeAfter(date); } CronExpression(String cronExpression); boolean isSatisfiedBy(Date date); Date getNextValidTimeAfter(Date date); Date getNextInvalidTimeAfter(Date date); TimeZone getTimeZone(); void setTimeZone(TimeZone timeZone); String toString(); static boolean isValidExpression(String cronExpression); String getCronExpression(); String getExpressionSummary(); Date getFinalFireTime(); Object clone();  }### Answer:
@Test public void getNextValidTimeAfter() throws ParseException { CronExpression expression = new CronExpression("0 * * * * ?"); Date date = expression.getNextValidTimeAfter(new Date()); assertEquals(0, (date.getTime() / 1000) % 60); expression = new CronExpression("0 1 * * * ?"); date = expression.getNextValidTimeAfter(new Date()); assertEquals(60, (date.getTime() / 1000) % 3600); }