Teach sal-remoterpc-connector to route actions
[controller.git] / opendaylight / md-sal / sal-remoterpc-connector / src / test / java / org / opendaylight / controller / remote / rpc / RemoteOpsProviderTest.java
@@ -7,6 +7,7 @@
  */
 package org.opendaylight.controller.remote.rpc;
 
+import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.mock;
 
 import akka.actor.ActorRef;
@@ -16,21 +17,22 @@ import com.typesafe.config.Config;
 import com.typesafe.config.ConfigFactory;
 import java.util.concurrent.TimeUnit;
 import org.junit.AfterClass;
-import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.opendaylight.mdsal.dom.api.DOMActionProviderService;
+import org.opendaylight.mdsal.dom.api.DOMActionService;
 import org.opendaylight.mdsal.dom.api.DOMRpcProviderService;
 import org.opendaylight.mdsal.dom.api.DOMRpcService;
 import scala.concurrent.Await;
 import scala.concurrent.duration.FiniteDuration;
 
-public class RemoteRpcProviderTest {
+public class RemoteOpsProviderTest {
     static ActorSystem system;
-    static RemoteRpcProviderConfig moduleConfig;
+    static RemoteOpsProviderConfig moduleConfig;
 
     @BeforeClass
     public static void setup() {
-        moduleConfig = new RemoteRpcProviderConfig.Builder("odl-cluster-rpc")
+        moduleConfig = new RemoteOpsProviderConfig.Builder("odl-cluster-rpc")
                 .withConfigReader(ConfigFactory::load).build();
         final Config config = moduleConfig.get();
         system = ActorSystem.create("odl-cluster-rpc", config);
@@ -45,16 +47,16 @@ public class RemoteRpcProviderTest {
 
     @Test
     public void testRemoteRpcProvider() throws Exception {
-        try (RemoteRpcProvider rpcProvider = new RemoteRpcProvider(system, mock(DOMRpcProviderService.class),
-            mock(DOMRpcService.class), new RemoteRpcProviderConfig(system.settings().config()))) {
+        try (RemoteOpsProvider rpcProvider = new RemoteOpsProvider(system, mock(DOMRpcProviderService.class),
+                mock(DOMRpcService.class), new RemoteOpsProviderConfig(system.settings().config()),
+                mock(DOMActionProviderService.class), mock(DOMActionService.class))) {
 
             rpcProvider.start();
-
             final ActorRef actorRef = Await.result(
                     system.actorSelection(moduleConfig.getRpcManagerPath()).resolveOne(
                             FiniteDuration.create(1, TimeUnit.SECONDS)), FiniteDuration.create(2, TimeUnit.SECONDS));
 
-            Assert.assertTrue(actorRef.path().toString().contains(moduleConfig.getRpcManagerPath()));
+            assertTrue(actorRef.path().toString().contains(moduleConfig.getRpcManagerPath()));
         }
     }
 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.