### Question:
DefaultEventCorrelator implements EventCorrelator { @Override public void failed(String correlationId, Exception e) { log.debug("failed: {}", correlationId); remove(correlationId).ifPresent(future -> future.completeExceptionally(e)); } DefaultEventCorrelator(); @Override String register(CompletableFuture<Void> future); @Override void received(String correlationId); @Override void failed(String correlationId, Exception e);  }### Answer:
@Test public void failed() { var correlationId = underTest.register(future); underTest.failed(correlationId, new Exception()); assertThat(futures.isEmpty(), is(true)); assertThat(future.isCompletedExceptionally(), is(true)); }