Migrate away from AssertJ's catchThrowable()
Closes gh-35003
This commit is contained in:
@@ -29,7 +29,6 @@ import org.mockito.Mockito;
|
||||
import org.mockito.stubbing.Answer;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.catchThrowable;
|
||||
import static org.mockito.BDDMockito.willAnswer;
|
||||
import static org.mockito.BDDMockito.willThrow;
|
||||
import static org.mockito.Mockito.mock;
|
||||
@@ -69,7 +68,12 @@ abstract class AbstractProxyExceptionHandlingTests {
|
||||
|
||||
|
||||
private void invokeProxy() {
|
||||
throwableSeenByCaller = catchThrowable(() -> Objects.requireNonNull(proxy).doSomething());
|
||||
try {
|
||||
Objects.requireNonNull(proxy).doSomething();
|
||||
}
|
||||
catch (Throwable throwable) {
|
||||
throwableSeenByCaller = throwable;
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("SameParameterValue")
|
||||
|
||||
Reference in New Issue
Block a user