@Test
  public void testUnwrapExceptionReturnsOriginalExceptionIfNoWrapper() {
    IllegalArgumentException cause = new IllegalArgumentException();
    Throwable unwrappedThrowable = FutureUtil.unwrapExceptions(SamzaException.class, cause);
    assertEquals(cause, unwrappedThrowable);
  }
Test all futures in all collections complete before allOf completes.
Test completes exceptionally if any complete exceptionally.
Test works with heterogeneous value types.
Test works with heterogeneous collection types.
Test works with completion stages as well as completable futures.
samza-core/src/test/java/org/apache/samza/util/TestFutureUtil.java