@Deprecated
  public static <T> Task<T> callable(final String name, final Callable<? extends T> callable) {
    return Task.callable(name, () -> callable.call());
  }
@Test
  public void testDelayTaskFailed() {
    IllegalArgumentException exception = new IllegalArgumentException("Oops!");
    final Task<Integer> task = Task.callable(() -> {
      throw exception;
    });
    final Task<Integer> taskWithDelay = task.withDelay(200, TimeUnit.MILLISECONDS);

    IllegalArgumentException actualException = runAndWaitException(taskWithDelay, IllegalArgumentException.class);

    assertEquals(exception, actualException);

    // Both tasks should be completed.
    assertTrue(task.isDone());
    assertTrue(taskWithDelay.isDone());

    // Both tasks should have failed.
    assertTrue(task.isFailed());
    assertTrue(taskWithDelay.isFailed());
  }