We have a cron based job in our application.
The job class is as follows:
public class DailyUpdate implements Job {
public void execute(JobExecutionContext context) throws JobExecutionException {
SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
testMethod();
}
private void testMethod()
{
System.out.pritnln("Executed From scheduler");
}
}
How should we write unit test case to test Method testMethod()
I cannot call testMethod Directly without scheduler as it is private..Any suggestion how to write unit test cases for Scheduler