CronExpression extends KieCronExpression implements Cloneable { public boolean isSatisfiedBy(Date date) { Calendar testDateCal = Calendar.getInstance(getTimeZone()); testDateCal.setTime(date); testDateCal.set(Calendar.MILLISECOND, 0); Date originalDate = testDateCal.getTime(); testDateCal.add(Calendar.SECOND, -1); Date timeAfter = getTimeAfter(testDateCal.getTime()); return ((timeAfter != null) && (timeAfter.equals(originalDate))); } CronExpression(String cronExpression); boolean isSatisfiedBy(Date date); Date getNextValidTimeAfter(Date date); Date getNextInvalidTimeAfter(Date date); TimeZone getTimeZone(); void setTimeZone(TimeZone timeZone); Date getFinalFireTime(); Object clone();  }
@Test public void testIsSatisfiedBy() throws Exception { CronExpression cronExpression = new CronExpression("0 15 10 * * ? 2005"); Calendar cal = Calendar.getInstance(); cal.set(2005, Calendar.JUNE, 1, 10, 15, 0); assertTrue(cronExpression.isSatisfiedBy(cal.getTime())); cal.set(Calendar.YEAR, 2006); assertFalse(cronExpression.isSatisfiedBy(cal.getTime())); cal = Calendar.getInstance(); cal.set(2005, Calendar.JUNE, 1, 10, 16, 0); assertFalse(cronExpression.isSatisfiedBy(cal.getTime())); cal = Calendar.getInstance(); cal.set(2005, Calendar.JUNE, 1, 10, 14, 0); assertFalse(cronExpression.isSatisfiedBy(cal.getTime())); }