throwsBy

infix fun <T> AnsweringScope<T>.throwsBy(function: () -> Throwable)

Function call throws exception provided each time by function.