Migrate from JavaTestKit to javadsl.TestKit
[controller.git] / opendaylight / md-sal / sal-remoterpc-connector / src / test / java / org / opendaylight / controller / remote / rpc / RpcRegistrarTest.java
index aecadc4eb114fbb4ecff478084f220076a97e071..dd11dd7ff5adf7763f48c99b895f7ddd9d8f566c 100644 (file)
@@ -11,8 +11,8 @@ import akka.actor.ActorRef;
 import akka.actor.ActorSystem;
 import akka.actor.Address;
 import akka.actor.Props;
-import akka.testkit.JavaTestKit;
 import akka.testkit.TestActorRef;
+import akka.testkit.javadsl.TestKit;
 import com.google.common.collect.ImmutableMap;
 import java.util.Collections;
 import java.util.Map;
@@ -52,7 +52,7 @@ public class RpcRegistrarTest {
         MockitoAnnotations.initMocks(this);
         system = ActorSystem.create("test");
 
-        final JavaTestKit testKit = new JavaTestKit(system);
+        final TestKit testKit = new TestKit(system);
         final RemoteRpcProviderConfig config = new RemoteRpcProviderConfig.Builder("system").build();
         final Props props = RpcRegistrar.props(config, service);
         testActorRef = new TestActorRef<>(system, props, testKit.getRef(), "actorRef");
@@ -63,7 +63,7 @@ public class RpcRegistrarTest {
         final DOMRpcIdentifier secondEndpointId = DOMRpcIdentifier.create(
                 SchemaPath.create(true, QName.create("second:identifier", "bar")));
 
-        final JavaTestKit senderKit = new JavaTestKit(system);
+        final TestKit senderKit = new TestKit(system);
         firstEndpoint = new RemoteRpcEndpoint(senderKit.getRef(), Collections.singletonList(firstEndpointId));
         secondEndpoint = new RemoteRpcEndpoint(senderKit.getRef(), Collections.singletonList(secondEndpointId));
 
@@ -78,7 +78,7 @@ public class RpcRegistrarTest {
 
     @After
     public void tearDown() throws Exception {
-        JavaTestKit.shutdownActorSystem(system, null, Boolean.TRUE);
+        TestKit.shutdownActorSystem(system, true);
     }
 
     @Test
@@ -136,4 +136,4 @@ public class RpcRegistrarTest {
 
         Mockito.verifyNoMoreInteractions(service, oldReg, newReg);
     }
-}
\ No newline at end of file
+}