@isTest private class SetOlympusCalendarWorkDayBatchSchTest { static testMethod void SchedulerTest() { String FireTime = '0 0 0 3 9 ? 2022'; Test.startTest(); String jobId = system.schedule('SetOlympusCalendarWorkDayBatchSchTest', FireTime, new SetOlympusCalendarWorkDayBatchSchedule()); Test.stopTest(); CronTrigger ct = [SELECT Id, CronExpression, TimesTriggered, NextFireTime FROM CronTrigger WHERE id = :jobId]; // Verify the expressions are the same System.assertEquals(FireTime, ct.CronExpression); // Verify the job has not run System.assertEquals(0, ct.TimesTriggered); // Verify the next time the job will run System.assertEquals('2022-09-03 00:00:00', String.valueOf(ct.NextFireTime)); } }