Skip to content

Commit f19a1b5

Browse files
committed
Polishing
1 parent 5532574 commit f19a1b5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spring-aop/src/test/java/org/springframework/aop/framework/ProxyExceptionHandlingTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import java.util.Objects;
2222

2323
import org.aopalliance.intercept.MethodInterceptor;
24-
import org.assertj.core.api.WithAssertions;
2524
import org.junit.jupiter.api.BeforeEach;
2625
import org.junit.jupiter.api.Nested;
2726
import org.junit.jupiter.api.Test;
@@ -31,6 +30,8 @@
3130
import org.springframework.cglib.proxy.Enhancer;
3231
import org.springframework.lang.Nullable;
3332

33+
import static org.assertj.core.api.Assertions.assertThat;
34+
import static org.assertj.core.api.Assertions.catchThrowable;
3435
import static org.mockito.BDDMockito.doAnswer;
3536
import static org.mockito.BDDMockito.doThrow;
3637
import static org.mockito.BDDMockito.mock;
@@ -39,15 +40,15 @@
3940
* @author Mikaël Francoeur
4041
* @since 6.2
4142
*/
42-
abstract class ProxyExceptionHandlingTests implements WithAssertions {
43+
abstract class ProxyExceptionHandlingTests {
4344

4445
private static final RuntimeException uncheckedException = new RuntimeException();
4546

4647
private static final DeclaredCheckedException declaredCheckedException = new DeclaredCheckedException();
4748

4849
private static final UndeclaredCheckedException undeclaredCheckedException = new UndeclaredCheckedException();
4950

50-
protected final MyClass target = mock(MyClass.class);
51+
protected final MyClass target = mock();
5152

5253
protected final ProxyFactory proxyFactory = new ProxyFactory(target);
5354

@@ -63,8 +64,7 @@ void clear() {
6364
Mockito.clearInvocations(target);
6465
}
6566

66-
protected void assertProxyType(Object proxy) {
67-
}
67+
protected abstract void assertProxyType(Object proxy);
6868

6969
private void invokeProxy() {
7070
throwableSeenByCaller = catchThrowable(() -> Objects.requireNonNull(proxy).doSomething());

0 commit comments

Comments
 (0)