@Test
public void testMonoMergeWithError() {

    Map<String, Mono<Void>> monoMap = ImmutableMap.<String, Mono<Void>>builder()
            .put("mono1", Mono.defer(Mono::empty))
            .put("mono2", Mono.defer(() -> Mono.error(new RuntimeException("Simulated error"))))
            .put("mono3", Mono.defer(Mono::empty))
            .build();
    Map<String, Optional<Throwable>> executionResult = ReactorExt.merge(monoMap, 2, Schedulers.parallel()).block();
    assertThat(executionResult).hasSize(3);
    assertThat(executionResult.get("mono1")).isEmpty();
    assertThat(executionResult.get("mono2")).containsInstanceOf(RuntimeException.class);
    assertThat(executionResult.get("mono3")).isEmpty();
}