public static List<Throwable> getCauseChain(Throwable exception) {
    Assert.notNull(exception);
    List<Throwable> result = new ArrayList<>();
    collectCauseChain(exception, result);
    return result;
  }
Returns a list of all causes of the specified exception. The first element of the
returned list is the specified exception itself; the last element is its root cause.

@param exception an exception

@return the exception's cause chain
spock-core/src/main/java/spock/util/Exceptions.java