code: public static void assertCauseMessage(final Throwable ex, final String expectedMessage) {
          assertThat(ex.getCause()).isNotNull();
          assertThat(ex.getCause().getMessage()).isEqualTo(expectedMessage);
      }
docs: Verifies that the cause of an exception contains an expected message.
  
  @param ex
  Exception with the cause to check,
  @param expectedMessage
  Message of the cause.