public void createWorkers(int numberOfWorkers, TaskSet taskSet, TaskHandler taskHandler) {
    for (var id = 1; id <= numberOfWorkers; id++) {
      var worker = new Worker(id, this, taskSet, taskHandler);
      workers.add(worker);
    }
    promoteLeader();
  }
@Test
  void testCreateWorkers() {
    var taskSet = new TaskSet();
    var taskHandler = new TaskHandler();
    var workCenter = new WorkCenter();
    workCenter.createWorkers(5, taskSet, taskHandler);
    assertEquals(5, workCenter.getWorkers().size());
    assertEquals(workCenter.getWorkers().get(0), workCenter.getLeader());
  }