title: Unit Testing Scheduler job in java
body: <p>We have a cron based job in our application.</p>
  
  <p>The job class is as follows:</p>
  
  <pre><code>       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");
          }
          }
  </code></pre>
  
  <p>How should we write unit test case to test Method 
  <strong>testMethod()</strong></p>
  
  <p>I cannot call testMethod Directly without scheduler as it is private..Any suggestion how to write unit test cases for Scheduler </p>