@Test
public void daemonThreadsWhenFlagSet() {

    scheduler = new DockerTaskScheduler(3, true, Duration.ofSeconds(2));
    InstanceTestTaskDelegator task = new InstanceTestTaskDelegator(instance1);
    task.fixture = () -> assertThat(Thread.currentThread().isDaemon()).isTrue();
    scheduler.scheduleInstanceTask(task.task);
    waitUntil(task::isSuccessful);
}