public Map<Endpoint, CompletableFuture<Void>> futures() {
        return futures;
    }
@Test
    public void testFailedReadinessFuture() {
        CompletableFuture<Void> foo = new CompletableFuture<>();
        CompletableFuture<Void> bar = new CompletableFuture<>();
        EndpointReadyFutures readyFutures = new EndpointReadyFutures.Builder().
                addReadinessFuture("foo", foo).
                addReadinessFuture("bar", bar).
                build(Optional.empty(), INFO);
        assertEquals(new HashSet<>(Arrays.asList(EXTERNAL, INTERNAL)),
                readyFutures.futures().keySet());
        assertIncomplete(readyFutures, EXTERNAL, INTERNAL);
        foo.complete(null);
        assertIncomplete(readyFutures, EXTERNAL, INTERNAL);
        bar.completeExceptionally(new RuntimeException("Failed."));
        assertException(readyFutures, new RuntimeException("Failed."),
                EXTERNAL, INTERNAL);
    }