@Deprecated
  public static <T> Task<T> callable(final String name, final Callable<? extends T> callable) {
    return Task.callable(name, () -> callable.call());
  }
@Test
  public void testTimeoutTaskWithError() throws InterruptedException {
    final Exception error = new Exception();
    final Task<String> task = Task.callable("task", () -> {
      throw error;
    } );

    final Task<String> timeoutTask = task.withTimeout(2000, TimeUnit.MILLISECONDS);

    getEngine().run(timeoutTask);

    // We should complete with an error almost immediately
    assertTrue(timeoutTask.await(100, TimeUnit.MILLISECONDS));

    assertTrue(timeoutTask.isFailed());
    assertEquals(error, timeoutTask.getError());
  }