s_logger.info("testJobCancel");
final JobDispatcher jobDispatcher = new JobDispatcher();
jobDispatcher.setMaxJobExecutionTime(2 * TIMEOUT);
jobDispatcher.setMaxJobAttempts(1);
final TestJobResultReceiver result = new TestJobResultReceiver();
Cancelable job = jobDispatcher.dispatchJob(createTestJob(), result);
assertNotNull(job);
assertNull(result.getResult());
final BlockingJobInvoker blockingInvoker = new BlockingJobInvoker(TIMEOUT);
jobDispatcher.registerJobInvoker(blockingInvoker);
assertTrue (job.cancel (false));
assertTrue (blockingInvoker.isCancelled ());
}