class ThrowableAssert<ACTUAL extends Throwable> extends AbstractThrowableAssert<ThrowableAssert<ACTUAL>, ACTUAL> {

  public interface ThrowingCallable {
    void call() throws Throwable;
  }

  public ThrowableAssert(ACTUAL actual) {
    super(actual, ThrowableAssert.class);
  }

  public <V> ThrowableAssert(Callable<V> runnable) {
    super(buildThrowableAssertFromCallable(runnable), ThrowableAssert.class);
  }

  @SuppressWarnings("unchecked")
  private static <V, THROWABLE extends Throwable> THROWABLE buildThrowableAssertFromCallable(Callable<V> callable) throws AssertionError {
    try {
      callable.call();
      // fail if the expected exception was *not* thrown
      Fail.fail("Expecting code to throw an exception.");
      // this will *never* happen...
      return null;
    } catch (AssertionError e) {
      // do not handle AssertionErrors in the next catch block!
      throw e;
    } catch (Throwable throwable) {
      // the throwable we will check
      return (THROWABLE) throwable;
    }
  }

  public static Throwable catchThrowable(ThrowingCallable shouldRaiseThrowable) {<FILL_FUNCTION_BODY>}

  @SuppressWarnings("unchecked")
  public static <THROWABLE extends Throwable> THROWABLE catchThrowableOfType(ThrowingCallable shouldRaiseThrowable,
                                                                             Class<THROWABLE> type) {
    Throwable throwable = catchThrowable(shouldRaiseThrowable);
    if (throwable == null) return null;
    // check exception type
    new ThrowableAssert(throwable).overridingErrorMessage(shouldBeInstance(throwable, type).create())
                                  .isInstanceOf(type);
    return (THROWABLE) throwable;
  }
}

    try {
      shouldRaiseThrowable.call();
    } catch (Throwable throwable) {
      return throwable;
    }
    return null;
  
<methods>public AbstractThrowableAssert<?,?> cause() ,public void doesNotThrowAnyException() ,public AbstractThrowableAssert<?,?> getCause() ,public AbstractThrowableAssert<?,?> getRootCause() ,public ThrowableAssert<ACTUAL> hasCause(java.lang.Throwable) ,public ThrowableAssert<ACTUAL> hasCauseExactlyInstanceOf(Class<? extends java.lang.Throwable>) ,public ThrowableAssert<ACTUAL> hasCauseInstanceOf(Class<? extends java.lang.Throwable>) ,public ThrowableAssert<ACTUAL> hasCauseReference(java.lang.Throwable) ,public ThrowableAssert<ACTUAL> hasMessage(java.lang.String) ,public transient ThrowableAssert<ACTUAL> hasMessage(java.lang.String, java.lang.Object[]) ,public ThrowableAssert<ACTUAL> hasMessageContaining(java.lang.String) ,public transient ThrowableAssert<ACTUAL> hasMessageContaining(java.lang.String, java.lang.Object[]) ,public transient ThrowableAssert<ACTUAL> hasMessageContainingAll(java.lang.CharSequence[]) ,public ThrowableAssert<ACTUAL> hasMessageEndingWith(java.lang.String) ,public transient ThrowableAssert<ACTUAL> hasMessageEndingWith(java.lang.String, java.lang.Object[]) ,public ThrowableAssert<ACTUAL> hasMessageFindingMatch(java.lang.String) ,public ThrowableAssert<ACTUAL> hasMessageMatching(java.lang.String) ,public ThrowableAssert<ACTUAL> hasMessageMatching(java.util.regex.Pattern) ,public ThrowableAssert<ACTUAL> hasMessageNotContaining(java.lang.String) ,public transient ThrowableAssert<ACTUAL> hasMessageNotContainingAny(java.lang.CharSequence[]) ,public ThrowableAssert<ACTUAL> hasMessageStartingWith(java.lang.String) ,public transient ThrowableAssert<ACTUAL> hasMessageStartingWith(java.lang.String, java.lang.Object[]) ,public ThrowableAssert<ACTUAL> hasNoCause() ,public ThrowableAssert<ACTUAL> hasNoSuppressedExceptions() ,public ThrowableAssert<ACTUAL> hasRootCause(java.lang.Throwable) ,public ThrowableAssert<ACTUAL> hasRootCauseExactlyInstanceOf(Class<? extends java.lang.Throwable>) ,public ThrowableAssert<ACTUAL> hasRootCauseInstanceOf(Class<? extends java.lang.Throwable>) ,public ThrowableAssert<ACTUAL> hasRootCauseMessage(java.lang.String) ,public transient ThrowableAssert<ACTUAL> hasRootCauseMessage(java.lang.String, java.lang.Object[]) ,public ThrowableAssert<ACTUAL> hasStackTraceContaining(java.lang.String) ,public transient ThrowableAssert<ACTUAL> hasStackTraceContaining(java.lang.String, java.lang.Object[]) ,public ThrowableAssert<ACTUAL> hasSuppressedException(java.lang.Throwable) ,public AbstractStringAssert<?> message() ,public AbstractThrowableAssert<?,?> rootCause() <variables>org.assertj.core.internal.Throwables throwables