@Test
public void multipleClientTaskAreExecutedSynchronously() {

    scheduler = new DockerTaskScheduler(3, false, Duration.ofSeconds(2));
    ClientTestTaskDelegator clientTask1 = new ClientTestTaskDelegator();
    ClientTestTaskDelegator clientTask2 = new ClientTestTaskDelegator();
    clientLock.lock();
    scheduler.scheduleClientTask(clientTask1.task);
    scheduler.scheduleClientTask(clientTask2.task);
    waitMillis(500);
    assertThat(clientTask1.executions).hasSize(1).first().matches(Execution::isRunning);
    assertThat(clientTask2.executions).isEmpty();
    clientLock.unlock();
    waitMillis(500);
    assertThat(clientTask2.isSuccessful()).isTrue();
}