@Test
public void differentInstanceTasksMayExecuteConcurrently() {

    scheduler = new DockerTaskScheduler(3, false, Duration.ofSeconds(2));
    InstanceTestTaskDelegator task1 = new InstanceTestTaskDelegator(instance1);
    InstanceTestTaskDelegator task2 = new InstanceTestTaskDelegator(instance2);
    InstanceTestTaskDelegator task3 = new InstanceTestTaskDelegator(instance3);
    instanceLock.lock();
    scheduler.scheduleInstanceTask(task1.task);
    scheduler.scheduleInstanceTask(task2.task);
    scheduler.scheduleInstanceTask(task3.task);
    waitMillis(500);
    assertThat(task1.isRunning()).isTrue();
    assertThat(task2.isRunning()).isTrue();
    assertThat(task3.isRunning()).isTrue();
}