@Test void blockErrorRuntimeExceptionShouldThrowRuntimeException() { assertThatThrownBy(() -> MailboxReactorUtils.block(Mono.error(new RuntimeException()))) .isInstanceOf(RuntimeException.class); }
public static <T> T block(Mono<T> publisher) throws MailboxException { try { return publisher.block(); } catch (RuntimeException e) { if (e.getCause() instanceof MailboxException) { throw (MailboxException) e.getCause(); } throw e; } }
MailboxReactorUtils { public static <T> T block(Mono<T> publisher) throws MailboxException { try { return publisher.block(); } catch (RuntimeException e) { if (e.getCause() instanceof MailboxException) { throw (MailboxException) e.getCause(); } throw e; } } }
MailboxReactorUtils { public static <T> T block(Mono<T> publisher) throws MailboxException { try { return publisher.block(); } catch (RuntimeException e) { if (e.getCause() instanceof MailboxException) { throw (MailboxException) e.getCause(); } throw e; } }  }
MailboxReactorUtils { public static <T> T block(Mono<T> publisher) throws MailboxException { try { return publisher.block(); } catch (RuntimeException e) { if (e.getCause() instanceof MailboxException) { throw (MailboxException) e.getCause(); } throw e; } }  static T block(Mono<T> publisher); static T block(Publisher<T> publisher); static Optional<T> blockOptional(Mono<T> publisher); }
MailboxReactorUtils { public static <T> T block(Mono<T> publisher) throws MailboxException { try { return publisher.block(); } catch (RuntimeException e) { if (e.getCause() instanceof MailboxException) { throw (MailboxException) e.getCause(); } throw e; } }  static T block(Mono<T> publisher); static T block(Publisher<T> publisher); static Optional<T> blockOptional(Mono<T> publisher);  }