public static Throwable getRootCause(Throwable exception) {
    Assert.notNull(exception);
    return exception.getCause() == null ? exception : getRootCause(exception.getCause());
  }
Returns the innermost cause of the specified exception. If the specified exception
has no cause, the exception itself is returned.

@param exception an exception

@return the root cause of the exception
spock-core/src/main/java/spock/util/Exceptions.java