Starting thread thread with Task class
===

I would like to test my task class that extends javafx.concurrent.Task. I overrode call method and I want to test invocation of method with JUnit test.

       public class myTask extends Task<Void> {
         @Override
         protected Void call() throws Exception {
           while(!isCancelled()){
             doSth();
           }
           return null;
         }
       }

then I want to test it in jUnit class.

    public class MyTaskTest {
       @Test
       public void testCall() throws Exception {
         MyTask task = new MyTask();
         Thread th = new Thread(task);
         th.start();
         //.... further validation
       }
    }

that does nothing. There's any execution of call method in started thread. Could somebody explain me why is that? 