What is the correct way to create an already-completed CompletableFuture<Void> : <p>I am using Completable futures in java 8 and I want to write a method that, based on a received parameter, either runs multiple tasks with side effects in parallel and then return their "combined" future (using <code>CompletableFuture.allOf()</code>), or does nothing and returns an already-completed future.</p>

<p>However, <code>allOf</code> returns a <code>CompletableFuture&lt;Void&gt;</code>:</p>

<pre><code>public static CompletableFuture&lt;Void&gt; allOf(CompletableFuture&lt;?&gt;... cfs)
</code></pre>

<p>And the only way to create an already-completed future that  know is using <code>completedFuture()</code>, which expects a value:</p>

<pre><code>public static &lt;U&gt; CompletableFuture&lt;U&gt; completedFuture(U value)
</code></pre>

<blockquote>
  <p>Returns a new CompletableFuture that is already completed with the given value.</p>
</blockquote>

<p>and <code>Void</code> is uninstantiable, so I need another way to create an already-completed future of type <code>CompletableFuture&lt;Void&gt;</code>.</p>

<p>What is the best way to do this?</p>
