public static void assertCauseMessage ( final Throwable ex , final String expectedMessage ) { assertThat ( ex . getCause ( ) ) . isNotNull ( ) ; assertThat ( ex . getCause ( ) . getMessage ( ) ) . isEqualTo ( expectedMessage ) ; }
Verifies that the cause of an exception contains an expected message .