    @Test
    public void testScheduleTask() throws TaskSchedulerException {

        Scheduler scheduler = new FakeQuartzScheduler();

        QuartzTaskScheduler quartzTaskScheduler = new QuartzTaskScheduler();
        quartzTaskScheduler.setScheduler(scheduler);

        TestTask task = new TestTask();
        TaskRegistration registration = quartzTaskScheduler.scheduleTask(
                new TaskConfiguration("*/15 * * ? * *", "name", "group", false),
                task);

        registration.trigger();
        assertTrue("Job was not executed", task.isExecuted());
    }