Awex { @SafeVarargs public final <Result, Progress> Promise<MultipleResult<Result, Progress>, Progress> afterAll(Promise<Result, Progress>... promises) { return afterAll(Arrays.asList(promises)); } Awex(ThreadHelper threadHelper, Logger logger, PoolPolicy poolPolicy); Promise<Result, Progress> submit(final Task<Result, Progress> task); void cancel(Task<Result, Progress> task, boolean mayInterrupt); @SafeVarargs final Promise<Result, Progress> sequentiallyUntilFirstDone(final
    Task<Result, Progress>... tasks); Promise<Result, Progress> sequentiallyUntilFirstDone(final
    Collection<Task<Result, Progress>> tasks); @SafeVarargs final Promise<Collection<Result>, Progress> allOf(Promise<Result, Progress>... promises); Promise<Collection<Result>, Progress> allOf(Collection<Promise<Result, Progress>> promises); @SafeVarargs final Promise<Result, Progress> anyOf(Promise<Result, Progress>... promises); Promise<Result, Progress> anyOf(Collection<Promise<Result, Progress>> promises); @SafeVarargs final Promise<MultipleResult<Result, Progress>, Progress> afterAll(Promise<Result, Progress>... promises); Promise<MultipleResult<Result, Progress>, Progress> afterAll(Collection<Promise<Result, Progress>> promises); @SuppressWarnings("unchecked") Promise<Result, Progress> of(Result value); ResolvablePromise<Result, Progress> newAwexPromise(); @SuppressWarnings("unchecked") Promise<Result, Progress> absent(); @Override String toString();  }
@Test public void shouldCreateAfterAllPromise() { setUpAwex(); Promise<MultipleResult<Integer, Float>, Float> afterAllPromise = mAwex.afterAll( new AwexPromise<Integer, Float>(mAwex), new AwexPromise<Integer, Float>(mAwex)); assertThat(afterAllPromise, instanceOf(AfterAllPromise.class)); }