public static <T> Callback<T> fromCompletableFuture(CompletableFuture<T> future) {
    return (result, exception) -> {
      if (exception != null) {
        future.completeExceptionally(exception);
      } else {
        future.complete(result);
      }
    };
  }
Create a callback that would complete the given {@link CompletableFuture} when the corresponding result
comes to callback.
@param future The given {@link CompletableFuture} to complete.
@param <T> The result's type.
@return
ambry-api/src/main/java/com/github/ambry/commons/CallbackUtils.java