title: Starting thread thread with Task class
body: <p>I would like to test my task class that extends javafx.concurrent.Task. I have overriden the call method:</p>
  
  <pre><code>   public class myTask extends Task&lt;Void&gt; {
       @Override
       protected Void call() throws Exception {
         while(!isCancelled()){
           doSth();
         }
         return null;
       }
     }
  </code></pre>
  
  <p>then I want to test the invocation of that method with a JUnit test:</p>
  
  <pre><code>public class MyTaskTest {
     @Test
     public void testCall() throws Exception {
       MyTask task = new MyTask();
       Thread th = new Thread(task);
       th.start();
       //.... further validation
     }
  }
  </code></pre>
  
  <p>but that does nothing. There is no execution of the call method in the started thread.  Could somebody explain why it is the case?</p>