RpcRegistrar unit test
[controller.git] / opendaylight / md-sal / sal-remoterpc-connector / src / main / java / org / opendaylight / controller / remote / rpc / registry / RpcRegistry.java
index 805e47a0dd05e7b52082f705f523b8870cd5bb02..40600d091e16345a61c9dbb9ecfe9096d89b6040 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.controller.remote.rpc.registry;
 import akka.actor.ActorRef;
 import akka.actor.Address;
 import akka.actor.Props;
+import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
@@ -109,7 +110,8 @@ public class RpcRegistry extends BucketStoreActor<RoutingTable> {
         private final Set<DOMRpcIdentifier> rpcs;
         private final ActorRef router;
 
-        RemoteRpcEndpoint(final ActorRef router, final Collection<DOMRpcIdentifier> rpcs) {
+        @VisibleForTesting
+        public RemoteRpcEndpoint(final ActorRef router, final Collection<DOMRpcIdentifier> rpcs) {
             this.router = Preconditions.checkNotNull(router);
             this.rpcs = ImmutableSet.copyOf(rpcs);
         }
@@ -161,7 +163,8 @@ public class RpcRegistry extends BucketStoreActor<RoutingTable> {
         public static final class UpdateRemoteEndpoints {
             private final Map<Address, Optional<RemoteRpcEndpoint>> endpoints;
 
-            UpdateRemoteEndpoints(final Map<Address, Optional<RemoteRpcEndpoint>> endpoints) {
+            @VisibleForTesting
+            public UpdateRemoteEndpoints(final Map<Address, Optional<RemoteRpcEndpoint>> endpoints) {
                 this.endpoints = ImmutableMap.copyOf(endpoints);
             }