title: CompletableFuture - Run multiple rest calls in parallel and get different result
body: <p>I have a rather common or unique requirement. For example, I have the following <code>AccountDetails</code> list:</p>
  <p><code>List&lt;AccountDetails&gt;</code></p>
  <pre><code>class AccountDetails {
      String bankAccountId;
      String mortgageAccountId;
      Integer noOfTrans;
      String addressLine;
      String externalLink;   
  }
  </code></pre>
  <p>All the above fields, except <code>bankAccountId</code> are pulled from external REST service call.
  I want to call all the REST services in parallel and update each object in the list:</p>
  <p>So, it looks like below:</p>
  <p>For each <code>accountDetails</code></p>
  <ul>
  <li>Call mortgage REST service and update <code>martgageAccountId</code>field (REST returns MortgageInfo object)</li>
  <li>Call transaction REST service and update <code>noOfTrans</code> field (REST returns <code>Transactions</code> object)</li>
  <li>Call address REST service and update <code>addressLine</code> field (REST returns <code>Address</code> object)</li>
  <li>Call link REST service and update <code>externalLink</code> field.  (REST returns <code>Links</code> object)</li>
  </ul>
  <p>I want all the above calls in parallel, and for each <code>AcccountDetails</code> object in the list.
  If there is an exception, I want do gracefully handle it. Note that each of the above REST service returns different custom object</p>
  <p>I am confused about how to achieve this with <code>CompletableFuture</code> chaining.
  Not sure <code>allOf</code> or <code>thenCombine</code> (which only takes two), or <code>thenCompose</code> should use and how to put all of these together.</p>
  <p>Any examples/ideas?</p>