Merge "Use CompletableFuture instead of a latch."