@Test
public void testCatchInvalidSqlExceptionWithCause() {

    ExceptionTransformer<CustomRuntimeException> exceptionNotFoundTransformer =
        new ExceptionTransformer<>(
            CustomRuntimeException.class,
            BadRuntimeException.class,
            SocketException.class);
    SocketException socketException = new SocketException("My custom SocketException");
    SQLException sqlException = new SQLException("My custom SQL Exception", socketException);
    Throwable actual = exceptionNotFoundTransformer.transformException(sqlException);
    assertThat(actual).isNotInstanceOf(CustomRuntimeException.class);
    // check second cause not found either
    exceptionNotFoundTransformer =
        new ExceptionTransformer<>(
            CustomRuntimeException.class,
            SQLException.class,
            BadRuntimeException.class);
    actual = exceptionNotFoundTransformer.transformException(sqlException);
    assertThat(actual).isNotInstanceOf(CustomRuntimeException.class);
}