public void promoteLeader() {
    Worker leader = null;
    if (!workers.isEmpty()) {
      leader = workers.get(0);
    }
    this.leader = leader;
  }
@Test
  void testPromoteLeader() {
    var taskSet = new TaskSet();
    var taskHandler = new TaskHandler();
    var workCenter = new WorkCenter();
    workCenter.createWorkers(5, taskSet, taskHandler);
    workCenter.removeWorker(workCenter.getLeader());
    workCenter.promoteLeader();
    assertEquals(4, workCenter.getWorkers().size());
    assertEquals(workCenter.getWorkers().get(0), workCenter.getLeader());
  }