### Question:
CompositeNotifier implements Notifier { @Override public Mono<Void> notify(InstanceEvent event) { return Flux.fromIterable(delegates).flatMap((d) -> d.notify(event).onErrorResume((error) -> { log.warn("Unexpected exception while triggering notifications. Notification might not be sent.", error); return Mono.empty(); })).then(); } CompositeNotifier(Iterable<Notifier> delegates); @Override Mono<Void> notify(InstanceEvent event);  }### Answer:
@Test public void should_trigger_all_notifiers() { TestNotifier notifier1 = new TestNotifier(); TestNotifier notifier2 = new TestNotifier(); CompositeNotifier compositeNotifier = new CompositeNotifier(Arrays.asList(notifier1, notifier2)); StepVerifier.create(compositeNotifier.notify(APP_DOWN)).verifyComplete(); assertThat(notifier1.getEvents()).containsOnly(APP_DOWN); assertThat(notifier2.getEvents()).containsOnly(APP_DOWN); }
@Test public void should_continue_on_exception() { Notifier notifier1 = (ev) -> Mono.error(new IllegalStateException("Test")); TestNotifier notifier2 = new TestNotifier(); CompositeNotifier compositeNotifier = new CompositeNotifier(Arrays.asList(notifier1, notifier2)); StepVerifier.create(compositeNotifier.notify(APP_DOWN)).verifyComplete(); assertThat(notifier2.getEvents()).containsOnly(APP_DOWN); }