title: How to test Spring @Scheduled
body: <p>How do I test <a href="https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/scheduling/annotation/Scheduled.html" rel="noreferrer"><code>@Scheduled</code></a> job tasks in my spring-boot application?</p>
  
  <pre><code> package com.myco.tasks;
  
   public class MyTask {
       @Scheduled(fixedRate=1000)
       public void work() {
           // task execution logic
       }
   }
  </code></pre>