2121import com .tencent .trpc .core .rpc .def .DefResponse ;
2222import com .tencent .trpc .core .utils .FutureUtils ;
2323import java .util .concurrent .CompletionStage ;
24- import org .junit .Assert ;
25- import org .junit .Before ;
26- import org .junit .Test ;
24+ import org .junit .jupiter . api . Assertions ;
25+ import org .junit .jupiter . api . BeforeEach ;
26+ import org .junit .jupiter . api . Test ;
2727
2828public class ClusterInterceptorInvokerTest {
2929
@@ -33,7 +33,7 @@ public class ClusterInterceptorInvokerTest {
3333 /**
3434 * Init clusterInvoker & clusterInvokerNoInterceptors
3535 */
36- @ Before
36+ @ BeforeEach
3737 public void setUp () {
3838 ConsumerConfig <BlankRpcServiceName > consumerConfig = new ConsumerConfig <>();
3939 consumerConfig .setMock (false );
@@ -80,20 +80,20 @@ public CompletionStage<Response> invoke(Request request) {
8080 public void testNew () {
8181 ClusterInterceptorInvoker <BlankRpcServiceName > invoker = new ClusterInterceptorInvoker <>(clusterInvoker );
8282 ConsumerConfig <BlankRpcServiceName > config = invoker .getConfig ();
83- Assert .assertNotNull (config );
84- Assert .assertFalse (config .getMock ());
85- Assert .assertTrue (invoker .getInterface ().isAssignableFrom (BlankRpcServiceName .class ));
86- Assert .assertNotNull (invoker .getBackendConfig ());
87- Assert .assertEquals (invoker .getBackendConfig ().getInterceptors ().get (0 ), "log" );
88- Assert .assertNotNull (invoker .invoke (new DefRequest ()));
83+ Assertions .assertNotNull (config );
84+ Assertions .assertFalse (config .getMock ());
85+ Assertions .assertTrue (invoker .getInterface ().isAssignableFrom (BlankRpcServiceName .class ));
86+ Assertions .assertNotNull (invoker .getBackendConfig ());
87+ Assertions .assertEquals (invoker .getBackendConfig ().getInterceptors ().get (0 ), "log" );
88+ Assertions .assertNotNull (invoker .invoke (new DefRequest ()));
8989 }
9090
9191 @ Test
9292 public void testNewNoInterceptor () {
9393 ClusterInterceptorInvoker <BlankRpcServiceName > invokerWithoutInterceptor = new ClusterInterceptorInvoker <>(
9494 clusterInvokerNoInterceptors );
95- Assert .assertNotNull (invokerWithoutInterceptor );
96- Assert .assertTrue (invokerWithoutInterceptor .getBackendConfig ().getInterceptors ().isEmpty ());
95+ Assertions .assertNotNull (invokerWithoutInterceptor );
96+ Assertions .assertTrue (invokerWithoutInterceptor .getBackendConfig ().getInterceptors ().isEmpty ());
9797 }
9898
9999 @ TRpcService
0 commit comments