@Test(timeout = 1000)
public void testIncrementsA() throws ParseException {
ScheduleExpression expr = new ScheduleExpression().year(2008).month(1).dayOfMonth(20)
.hour("6/3").minute(30).start(new Date(0));
EJBCronTrigger trigger = new EJBCronTrigger(expr);
// Should fire on Sunday, January 20th, first at 6:30
Calendar calendar = new GregorianCalendar(2008, 0, 20);
Date startTime = new Date(calendar.getTimeInMillis() - 1000);
calendar.set(Calendar.HOUR_OF_DAY, 6);
calendar.set(Calendar.MINUTE, 30);
assertEquals(calendar.getTime(), trigger.getFireTimeAfter(startTime));
// Next on 9:30
startTime = new Date(calendar.getTimeInMillis());
calendar.set(Calendar.HOUR_OF_DAY, 9);
assertEquals(calendar.getTime(), trigger.getFireTimeAfter(startTime));
// Won't be fired after the 20th so it should return null
calendar = new GregorianCalendar(2008, 0, 21);
startTime = new Date(calendar.getTimeInMillis());
assertNull(trigger.getFireTimeAfter(startTime));
}