@Test
public void testFireOnceMajorityFailed1() {

  CompletableFuture<Boolean> f1 = new CompletableFuture<>();
  CompletableFuture<Boolean> f2 = new CompletableFuture<>();
  List<CompletableFuture<Boolean>> responses = Lists.newArrayList(
    f1, f2, completedFuture(Boolean.TRUE)
  );
  CompletableFuture<Boolean> collector = majorityResponse(responses, input -> input);
  f1.completeExceptionally(new Exception());
  assertFalse(collector.isDone());
  f2.completeExceptionally(new Exception());
  assertTrue(collector.isDone());
  assertFalse(Futures.getUnchecked(collector));
}