public void handleTask(Task task) throws InterruptedException {
    var time = task.getTime();
    Thread.sleep(time);
    LOGGER.info("It takes " + time + " milliseconds to finish the task");
    task.setFinished(true);
  }
@Test
  void testHandleTask() throws InterruptedException {
    var taskHandler = new TaskHandler();
    var handle = new Task(100);
    taskHandler.handleTask(handle);
    assertTrue(handle.isFinished());
  }