@Deprecated
  public static <T> ParTask<T> par(Task<? extends T> task1, Task<? extends T> task2) {
    return vapar(task1, task2);
  }
@Test
  public void testManyTimeoutTaskWithoutTimeoutOnAQueue() throws InterruptedException, IOException {
    final String value = "value";
    final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);

    List<Task<String>> tasks = new ArrayList<Task<String>>();
    for (int i = 0; i < 50; i++) {

      // Task which simulates doing something for 0.5ms and setting response
      // asynchronously after 5ms.
      Task<String> t = new BaseTask<String>("test") {
        @Override
        protected Promise<? extends String> run(Context context) throws Throwable {
          final SettablePromise<String> result = Promises.settable();
          Thread.sleep(0, 500000);
          scheduler.schedule(new Runnable() {
            @Override
            public void run() {
              result.done(value);
            }
          }, 5, TimeUnit.MILLISECONDS);
          return result;
        }
      };
      tasks.add(t.withTimeout(50, TimeUnit.MILLISECONDS));
    }

    // final task runs all the tasks in parallel
    final Task<?> timeoutTask = Tasks.par(tasks);

    runAndWait("TestTasks.testManyTimeoutTaskWithoutTimeoutOnAQueue", timeoutTask);

    scheduler.shutdown();

    //tasks should not time out
    assertEquals(false, timeoutTask.isFailed());
  }