Assuming that I have a
<bean id="midMonthCronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="reminderJobDetail" />
<property name="cronExpression" value="0 0 6 15W * ?" />
Well firstly, there's no point in testing
CronTriggerBean itself. It's part of the spring framework, and has already been tested.
A better test might be to test that your cron expression is what you expect. One option here is to use Quartz's
CronExpression class. Given a
CronExpression object, you can call
getNextValidTimeAfter(Date), which returns the next time after the given Date when the expression will fire.