assertSame(recursiveCause.getCause(), ExceptionUtils.getCause(recursiveCause)); assertSame(recursiveCause.getCause().getCause(), ExceptionUtils.getCause(recursiveCause.getCause())); assertSame(recursiveCause.getCause(), ExceptionUtils.getCause(recursiveCause.getCause().getCause()));
assertSame(cyclicCause.getCause(), ExceptionUtils.getCause(cyclicCause)); assertSame(((ExceptionWithCause) cyclicCause.getCause()).getCause(), ExceptionUtils.getCause(cyclicCause.getCause())); assertSame(cyclicCause.getCause(), ExceptionUtils.getCause(((ExceptionWithCause) cyclicCause.getCause()).getCause()));
    public void testGetCause_Throwable() {        assertSame(null, ExceptionUtils.getCause(null));        assertSame(null, ExceptionUtils.getCause(withoutCause));        assertSame(withoutCause, ExceptionUtils.getCause(nested));        assertSame(nested, ExceptionUtils.getCause(withCause));        assertSame(null, ExceptionUtils.getCause(jdkNoCause));        assertSame(selfCause, ExceptionUtils.getCause(selfCause));        assertSame(recursiveCause.getCause(), ExceptionUtils.getCause(recursiveCause));        assertSame(recursiveCause.getCause().getCause(), ExceptionUtils.getCause(recursiveCause.getCause()));        assertSame(recursiveCause.getCause(), ExceptionUtils.getCause(recursiveCause.getCause().getCause()));    }