Slave mount point registration hardening/resiliency
[netconf.git] / netconf / netconf-topology-singleton / src / test / java / org / opendaylight / netconf / topology / singleton / impl / NetconfTopologyManagerTest.java
index 817a58a5eca7eabd5800507c92c0aa00d33e5b83..b3d4be1cde2c7f9b1931acdf42ef80f541944cde 100644 (file)
@@ -32,6 +32,7 @@ import javax.annotation.Nonnull;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mock;
+import org.opendaylight.aaa.encrypt.AAAEncryptionService;
 import org.opendaylight.controller.cluster.ActorSystemProvider;
 import org.opendaylight.controller.config.threadpool.ScheduledThreadPool;
 import org.opendaylight.controller.config.threadpool.ThreadPool;
@@ -84,11 +85,13 @@ public class NetconfTopologyManagerTest {
         final EventExecutor eventExecutor = mock(EventExecutor.class);
         final NetconfClientDispatcher clientDispatcher = mock(NetconfClientDispatcher.class);
         final DOMMountPointService mountPointService = mock(DOMMountPointService.class);
+        final AAAEncryptionService encryptionService = mock(AAAEncryptionService.class);
 
         final Config config = new ConfigBuilder().setWriteTransactionIdleTimeout(0).build();
         netconfTopologyManager = new NetconfTopologyManager(dataBroker, rpcProviderRegistry,
                 clusterSingletonServiceProvider, keepaliveExecutor, processingExecutor,
-                actorSystemProvider, eventExecutor, clientDispatcher, topologyId, config, mountPointService);
+                actorSystemProvider, eventExecutor, clientDispatcher, topologyId, config,
+                mountPointService, encryptionService);
     }
 
     @Test
@@ -109,7 +112,6 @@ public class NetconfTopologyManagerTest {
         doReturn(wtx).when(dataBroker).newWriteOnlyTransaction();
         doNothing().when(wtx).merge(any(), any(), any());
         doReturn(Futures.immediateCheckedFuture(null)).when(wtx).submit();
-        doReturn(null).when(dataBroker).registerDataChangeListener(any(), any(), any(), any());
 
         netconfTopologyManager.init();
 
@@ -272,7 +274,7 @@ public class NetconfTopologyManagerTest {
         }
     }
 
-    private class CustomTreeModification  implements DataTreeModification<Node> {
+    static class CustomTreeModification  implements DataTreeModification<Node> {
 
         private final DataTreeIdentifier<Node> rootPath;
         private final DataObjectModification<Node> rootNode;