Bump mdsal to 5.0.2
[netconf.git] / netconf / netconf-topology-singleton / src / test / java / org / opendaylight / netconf / topology / singleton / impl / MountPointEndToEndTest.java
index 45cfd3090e1d5ea7b6dcdc1e3fcae6fb1565df9c..f626164bf423baa3cb1e3cd9caef4319e4392fee 100644 (file)
@@ -14,7 +14,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.never;
@@ -26,10 +26,9 @@ import static org.mockito.MockitoAnnotations.initMocks;
 import akka.actor.ActorSystem;
 import akka.testkit.javadsl.TestKit;
 import akka.util.Timeout;
-import com.google.common.base.Optional;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
-import com.google.common.util.concurrent.CheckedFuture;
+import com.google.common.util.concurrent.FluentFuture;
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.MoreExecutors;
@@ -44,6 +43,8 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.Map.Entry;
+import java.util.Optional;
+import java.util.Set;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
@@ -56,43 +57,45 @@ 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;
-import org.opendaylight.controller.md.sal.binding.api.BindingTransactionChain;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
-import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier;
-import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
-import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
-import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
-import org.opendaylight.controller.md.sal.binding.test.AbstractConcurrentDataBrokerTest;
-import org.opendaylight.controller.md.sal.common.api.data.AsyncTransaction;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.md.sal.common.api.data.TransactionChain;
-import org.opendaylight.controller.md.sal.common.api.data.TransactionChainListener;
-import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
-import org.opendaylight.controller.md.sal.dom.api.DOMDataReadTransaction;
-import org.opendaylight.controller.md.sal.dom.api.DOMDataReadWriteTransaction;
-import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
-import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint;
-import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
-import org.opendaylight.controller.md.sal.dom.api.DOMRpcException;
-import org.opendaylight.controller.md.sal.dom.api.DOMRpcIdentifier;
-import org.opendaylight.controller.md.sal.dom.api.DOMRpcImplementation;
-import org.opendaylight.controller.md.sal.dom.api.DOMRpcResult;
-import org.opendaylight.controller.md.sal.dom.api.DOMRpcService;
-import org.opendaylight.controller.md.sal.dom.api.DOMService;
-import org.opendaylight.controller.md.sal.dom.broker.impl.DOMRpcRouter;
-import org.opendaylight.controller.md.sal.dom.broker.impl.mount.DOMMountPointServiceImpl;
-import org.opendaylight.controller.md.sal.dom.spi.DefaultDOMRpcResult;
-import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
+import org.opendaylight.mdsal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataObjectModification;
+import org.opendaylight.mdsal.binding.api.DataTreeIdentifier;
+import org.opendaylight.mdsal.binding.api.DataTreeModification;
+import org.opendaylight.mdsal.binding.api.ReadTransaction;
+import org.opendaylight.mdsal.binding.api.Transaction;
+import org.opendaylight.mdsal.binding.api.TransactionChain;
+import org.opendaylight.mdsal.binding.api.TransactionChainListener;
+import org.opendaylight.mdsal.binding.api.WriteTransaction;
+import org.opendaylight.mdsal.binding.dom.adapter.test.AbstractConcurrentDataBrokerTest;
 import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
 import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext;
+import org.opendaylight.mdsal.binding.spec.reflect.BindingReflections;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
+import org.opendaylight.mdsal.dom.api.DOMActionProviderService;
+import org.opendaylight.mdsal.dom.api.DOMActionService;
+import org.opendaylight.mdsal.dom.api.DOMDataBroker;
+import org.opendaylight.mdsal.dom.api.DOMDataTreeReadOperations;
+import org.opendaylight.mdsal.dom.api.DOMDataTreeReadWriteTransaction;
+import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction;
+import org.opendaylight.mdsal.dom.api.DOMMountPoint;
 import org.opendaylight.mdsal.dom.api.DOMMountPointListener;
+import org.opendaylight.mdsal.dom.api.DOMMountPointService;
+import org.opendaylight.mdsal.dom.api.DOMRpcIdentifier;
+import org.opendaylight.mdsal.dom.api.DOMRpcImplementation;
+import org.opendaylight.mdsal.dom.api.DOMRpcProviderService;
+import org.opendaylight.mdsal.dom.api.DOMRpcResult;
+import org.opendaylight.mdsal.dom.api.DOMRpcService;
+import org.opendaylight.mdsal.dom.api.DOMService;
+import org.opendaylight.mdsal.dom.broker.DOMMountPointServiceImpl;
+import org.opendaylight.mdsal.dom.broker.DOMRpcRouter;
+import org.opendaylight.mdsal.dom.spi.DefaultDOMRpcResult;
 import org.opendaylight.mdsal.eos.dom.simple.SimpleDOMEntityOwnershipService;
 import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider;
 import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceRegistration;
 import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier;
 import org.opendaylight.mdsal.singleton.dom.impl.DOMClusterSingletonServiceProviderImpl;
 import org.opendaylight.netconf.client.NetconfClientDispatcher;
+import org.opendaylight.netconf.sal.connect.api.DeviceActionFactory;
 import org.opendaylight.netconf.sal.connect.netconf.listener.NetconfSessionPreferences;
 import org.opendaylight.netconf.topology.singleton.impl.utils.ClusteringRpcException;
 import org.opendaylight.netconf.topology.singleton.impl.utils.NetconfTopologySetup;
@@ -121,13 +124,15 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeBuilder;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey;
+import org.opendaylight.yangtools.rcf8528.data.util.EmptyMountPointContext;
+import org.opendaylight.yangtools.util.concurrent.FluentFutures;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
-import org.opendaylight.yangtools.yang.binding.util.BindingReflections;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.RpcError;
 import org.opendaylight.yangtools.yang.common.RpcError.ErrorType;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
+import org.opendaylight.yangtools.yang.common.Uint16;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
 import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
@@ -151,7 +156,7 @@ import org.slf4j.LoggerFactory;
  * @author Thomas Pantelis
  */
 public class MountPointEndToEndTest {
-    private static Logger LOG = LoggerFactory.getLogger(MountPointEndToEndTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(MountPointEndToEndTest.class);
 
     private static final String TOP_MODULE_NAME = "opendaylight-mdsal-list-test";
     private static final String ACTOR_SYSTEM_NAME = "test";
@@ -160,11 +165,13 @@ public class MountPointEndToEndTest {
     private static final InstanceIdentifier<Node> NODE_INSTANCE_ID = NetconfTopologyUtils.createTopologyNodeListPath(
             new NodeKey(NODE_ID), TOPOLOGY_ID);
 
-    @Mock private RpcProviderRegistry mockRpcProviderRegistry;
+    @Mock private DOMRpcProviderService mockRpcProviderRegistry;
+    @Mock private DOMActionProviderService mockActionProviderRegistry;
     @Mock private NetconfClientDispatcher mockClientDispatcher;
     @Mock private AAAEncryptionService mockEncryptionService;
     @Mock private ThreadPool mockThreadPool;
     @Mock private ScheduledThreadPool mockKeepaliveExecutor;
+    @Mock private DeviceActionFactory deviceActionFactory;
 
     @Mock private ActorSystemProvider mockMasterActorSystemProvider;
     @Mock private DOMMountPointListener masterMountPointListener;
@@ -186,7 +193,7 @@ public class MountPointEndToEndTest {
     private ActorSystem slaveSystem;
     private NetconfTopologyManager slaveNetconfTopologyManager;
     private final SettableFuture<NetconfTopologyContext> slaveNetconfTopologyContextFuture = SettableFuture.create();
-    private BindingTransactionChain slaveTxChain;
+    private TransactionChain slaveTxChain;
 
     private final EventExecutor eventExecutor = GlobalEventExecutor.INSTANCE;
     private final Config config = new ConfigBuilder().setWriteTransactionIdleTimeout(0).build();
@@ -216,7 +223,7 @@ public class MountPointEndToEndTest {
         putTopRpcSchemaPath = findRpcDefinition("put-top").getPath();
         getTopRpcSchemaPath = findRpcDefinition("get-top").getPath();
 
-        deviceRpcService.registerRpcImplementation(topRpcImplementation,
+        deviceRpcService.getRpcProviderService().registerRpcImplementation(topRpcImplementation,
                 DOMRpcIdentifier.create(putTopRpcSchemaPath), DOMRpcIdentifier.create(getTopRpcSchemaPath));
 
         setupMaster();
@@ -265,14 +272,16 @@ public class MountPointEndToEndTest {
                     topModuleInfo.getName().getRevision()), YangTextSchemaSource.class, 1));
 
         masterNetconfTopologyManager = new NetconfTopologyManager(masterDataBroker, mockRpcProviderRegistry,
-                masterClusterSingletonServiceProvider, mockKeepaliveExecutor, mockThreadPool,
+            mockActionProviderRegistry, masterClusterSingletonServiceProvider, mockKeepaliveExecutor, mockThreadPool,
                 mockMasterActorSystemProvider, eventExecutor, mockClientDispatcher, TOPOLOGY_ID, config,
-                masterMountPointService, mockEncryptionService) {
+                masterMountPointService, mockEncryptionService, deviceActionFactory) {
             @Override
             protected NetconfTopologyContext newNetconfTopologyContext(final NetconfTopologySetup setup,
-                    final ServiceGroupIdentifier serviceGroupIdent, final Timeout actorResponseWaitTime) {
+                final ServiceGroupIdentifier serviceGroupIdent, final Timeout actorResponseWaitTime,
+                final DeviceActionFactory deviceActionFact) {
                 NetconfTopologyContext context =
-                        super.newNetconfTopologyContext(setup, serviceGroupIdent, actorResponseWaitTime);
+                    super.newNetconfTopologyContext(setup, serviceGroupIdent, actorResponseWaitTime, deviceActionFact);
+
                 NetconfTopologyContext spiedContext = spy(context);
                 doAnswer(invocation -> {
                     final MasterSalFacade spiedFacade = (MasterSalFacade) spy(invocation.callRealMethod());
@@ -302,14 +311,16 @@ public class MountPointEndToEndTest {
                 .registerClusterSingletonService(any());
 
         slaveNetconfTopologyManager = new NetconfTopologyManager(slaveDataBroker, mockRpcProviderRegistry,
-                mockSlaveClusterSingletonServiceProvider, mockKeepaliveExecutor, mockThreadPool,
+            mockActionProviderRegistry, mockSlaveClusterSingletonServiceProvider, mockKeepaliveExecutor, mockThreadPool,
                 mockSlaveActorSystemProvider, eventExecutor, mockClientDispatcher, TOPOLOGY_ID, config,
-                slaveMountPointService, mockEncryptionService) {
+                slaveMountPointService, mockEncryptionService, deviceActionFactory) {
             @Override
             protected NetconfTopologyContext newNetconfTopologyContext(final NetconfTopologySetup setup,
-                    final ServiceGroupIdentifier serviceGroupIdent, final Timeout actorResponseWaitTime) {
-                NetconfTopologyContext spiedContext =
-                        spy(super.newNetconfTopologyContext(setup, serviceGroupIdent, actorResponseWaitTime));
+                final ServiceGroupIdentifier serviceGroupIdent, final Timeout actorResponseWaitTime,
+                final DeviceActionFactory actionFactory) {
+                NetconfTopologyContext spiedContext = spy(super.newNetconfTopologyContext(setup, serviceGroupIdent,
+                    actorResponseWaitTime, actionFactory));
+
                 slaveNetconfTopologyContextFuture.set(spiedContext);
                 return spiedContext;
             }
@@ -321,12 +332,12 @@ public class MountPointEndToEndTest {
 
         slaveTxChain = slaveDataBroker.createTransactionChain(new TransactionChainListener() {
             @Override
-            public void onTransactionChainSuccessful(final TransactionChain<?, ?> chain) {
+            public void onTransactionChainSuccessful(final TransactionChain chain) {
             }
 
             @Override
-            public void onTransactionChainFailed(final TransactionChain<?, ?> chain,
-                    final AsyncTransaction<?, ?> transaction, final Throwable cause) {
+            public void onTransactionChainFailed(final TransactionChain chain, final Transaction transaction,
+                    final Throwable cause) {
                 LOG.error("Slave transaction chain failed", cause);
             }
         });
@@ -352,8 +363,8 @@ public class MountPointEndToEndTest {
 
         final MasterSalFacade masterSalFacade = masterSalFacadeFuture.get(5, TimeUnit.SECONDS);
 
-        masterSalFacade.onDeviceConnected(deviceSchemaContext,
-                NetconfSessionPreferences.fromStrings(Collections.emptyList()), deviceRpcService);
+        masterSalFacade.onDeviceConnected(new EmptyMountPointContext(deviceSchemaContext),
+                NetconfSessionPreferences.fromStrings(Collections.emptyList()), deviceRpcService.getRpcService());
 
         DOMMountPoint masterMountPoint = awaitMountPoint(masterMountPointService);
 
@@ -378,7 +389,7 @@ public class MountPointEndToEndTest {
         // This is essentially what happens in a clustered environment but we'll use a DTCL here.
 
         masterDataBroker.registerDataTreeChangeListener(
-            new DataTreeIdentifier<>(LogicalDatastoreType.OPERATIONAL, NODE_INSTANCE_ID), changes -> {
+            DataTreeIdentifier.create(LogicalDatastoreType.OPERATIONAL, NODE_INSTANCE_ID), changes -> {
                 final WriteTransaction slaveTx = slaveTxChain.newWriteOnlyTransaction();
                 for (DataTreeModification<Node> dataTreeModification : changes) {
                     DataObjectModification<Node> rootNode = dataTreeModification.getRootNode();
@@ -427,8 +438,8 @@ public class MountPointEndToEndTest {
 
         MasterSalFacade masterSalFacade = masterSalFacadeFuture.get(5, TimeUnit.SECONDS);
 
-        masterSalFacade.onDeviceConnected(deviceSchemaContext,
-                NetconfSessionPreferences.fromStrings(Collections.emptyList()), deviceRpcService);
+        masterSalFacade.onDeviceConnected(new EmptyMountPointContext(deviceSchemaContext),
+                NetconfSessionPreferences.fromStrings(Collections.emptyList()), deviceRpcService.getRpcService());
 
         verify(masterMountPointListener, timeout(5000)).onMountPointCreated(yangNodeInstanceId);
 
@@ -447,7 +458,7 @@ public class MountPointEndToEndTest {
         awaitMountPointNotPresent(masterMountPointService);
 
         await().atMost(5, TimeUnit.SECONDS).until(() -> {
-            try (ReadOnlyTransaction readTx = masterDataBroker.newReadOnlyTransaction()) {
+            try (ReadTransaction readTx = masterDataBroker.newReadOnlyTransaction()) {
                 Optional<Node> node = readTx.read(LogicalDatastoreType.OPERATIONAL,
                         NODE_INSTANCE_ID).get(5, TimeUnit.SECONDS);
                 assertTrue(node.isPresent());
@@ -497,7 +508,9 @@ public class MountPointEndToEndTest {
     private void testRpc(final DOMRpcService domRpcService, final SchemaPath schemaPath,
             final NormalizedNode<?, ?> input, final DOMRpcResult result) throws InterruptedException,
             ExecutionException, TimeoutException {
-        final DOMRpcResult actual = invokeRpc(domRpcService, schemaPath, input, Futures.immediateCheckedFuture(result));
+        final FluentFuture<DOMRpcResult> future = result == null ? FluentFutures.immediateNullFluentFuture()
+                : FluentFutures.immediateFluentFuture(result);
+        final DOMRpcResult actual = invokeRpc(domRpcService, schemaPath, input, future);
         if (result == null) {
             assertNull(actual);
             return;
@@ -507,8 +520,8 @@ public class MountPointEndToEndTest {
         assertEquals(result.getResult(), actual.getResult());
 
         assertEquals(result.getErrors().size(), actual.getErrors().size());
-        Iterator<RpcError> iter1 = result.getErrors().iterator();
-        Iterator<RpcError> iter2 = actual.getErrors().iterator();
+        Iterator<? extends RpcError> iter1 = result.getErrors().iterator();
+        Iterator<? extends RpcError> iter2 = actual.getErrors().iterator();
         while (iter1.hasNext() && iter2.hasNext()) {
             RpcError err1 = iter1.next();
             RpcError err2 = iter2.next();
@@ -524,7 +537,7 @@ public class MountPointEndToEndTest {
     private void testFailedRpc(final DOMRpcService domRpcService, final SchemaPath schemaPath,
             final NormalizedNode<?, ?> input) throws InterruptedException, TimeoutException {
         try {
-            invokeRpc(domRpcService, schemaPath, input, Futures.immediateFailedCheckedFuture(
+            invokeRpc(domRpcService, schemaPath, input, FluentFutures.immediateFailedFluentFuture(
                     new ClusteringRpcException("mock")));
             fail("Expected exception");
         } catch (ExecutionException e) {
@@ -534,7 +547,7 @@ public class MountPointEndToEndTest {
     }
 
     private DOMRpcResult invokeRpc(final DOMRpcService domRpcService, final SchemaPath schemaPath,
-            final NormalizedNode<?, ?> input, final CheckedFuture<DOMRpcResult, DOMRpcException> returnFuture)
+            final NormalizedNode<?, ?> input, final FluentFuture<DOMRpcResult> returnFuture)
                     throws InterruptedException, ExecutionException, TimeoutException {
         topRpcImplementation.init(returnFuture);
         final ListenableFuture<DOMRpcResult> resultFuture = domRpcService.invokeRpc(schemaPath, input);
@@ -547,7 +560,7 @@ public class MountPointEndToEndTest {
     private static void testDOMDataBrokerOperations(final DOMDataBroker dataBroker)
             throws InterruptedException, ExecutionException, TimeoutException {
 
-        DOMDataWriteTransaction writeTx = dataBroker.newWriteOnlyTransaction();
+        DOMDataTreeWriteTransaction writeTx = dataBroker.newWriteOnlyTransaction();
 
         final ContainerNode topNode = Builders.containerBuilder()
                 .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(Top.QNAME)).build();
@@ -569,7 +582,7 @@ public class MountPointEndToEndTest {
         writeTx.delete(LogicalDatastoreType.CONFIGURATION, topPath);
         writeTx.commit().get(5, TimeUnit.SECONDS);
 
-        DOMDataReadWriteTransaction readTx = dataBroker.newReadWriteTransaction();
+        DOMDataTreeReadWriteTransaction readTx = dataBroker.newReadWriteTransaction();
         assertFalse(readTx.exists(LogicalDatastoreType.CONFIGURATION, topPath).get(5, TimeUnit.SECONDS));
         assertTrue(readTx.cancel());
     }
@@ -578,7 +591,7 @@ public class MountPointEndToEndTest {
             throws InterruptedException, ExecutionException, TimeoutException {
         final NetconfNode netconfNode = new NetconfNodeBuilder()
                 .setHost(new Host(new IpAddress(new Ipv4Address("127.0.0.1"))))
-                .setPort(new PortNumber(1234))
+                .setPort(new PortNumber(Uint16.valueOf(1234)))
                 .setActorResponseWaitTime(10)
                 .setTcpOnly(Boolean.TRUE)
                 .setSchemaless(Boolean.FALSE)
@@ -597,7 +610,7 @@ public class MountPointEndToEndTest {
         writeTx.commit().get(5, TimeUnit.SECONDS);
     }
 
-    private static void verifyDataInStore(final DOMDataReadTransaction readTx, final YangInstanceIdentifier path,
+    private static void verifyDataInStore(final DOMDataTreeReadOperations readTx, final YangInstanceIdentifier path,
             final NormalizedNode<?, ?> expNode) throws InterruptedException, ExecutionException, TimeoutException {
         final Optional<NormalizedNode<?, ?>> read = readTx.read(LogicalDatastoreType.CONFIGURATION, path)
                 .get(5, TimeUnit.SECONDS);
@@ -610,7 +623,7 @@ public class MountPointEndToEndTest {
 
     private static void verifyTopologyNodesCreated(final DataBroker dataBroker) {
         await().atMost(5, TimeUnit.SECONDS).until(() -> {
-            try (ReadOnlyTransaction readTx = dataBroker.newReadOnlyTransaction()) {
+            try (ReadTransaction readTx = dataBroker.newReadOnlyTransaction()) {
                 Optional<Topology> configTopology = readTx.read(LogicalDatastoreType.CONFIGURATION,
                         NetconfTopologyUtils.createTopologyListPath(TOPOLOGY_ID)).get(3, TimeUnit.SECONDS);
                 Optional<Topology> operTopology = readTx.read(LogicalDatastoreType.OPERATIONAL,
@@ -623,7 +636,7 @@ public class MountPointEndToEndTest {
     private AbstractConcurrentDataBrokerTest newDataBrokerTest() throws Exception {
         AbstractConcurrentDataBrokerTest dataBrokerTest = new AbstractConcurrentDataBrokerTest(true) {
             @Override
-            protected Iterable<YangModuleInfo> getModuleInfos() throws Exception {
+            protected Set<YangModuleInfo> getModuleInfos() throws Exception {
                 return ImmutableSet.of(BindingReflections.getModuleInfo(NetconfNode.class),
                         BindingReflections.getModuleInfo(NetworkTopology.class),
                         BindingReflections.getModuleInfo(Topology.class),
@@ -649,6 +662,10 @@ public class MountPointEndToEndTest {
         return getMountPointService(mountPoint, DOMRpcService.class);
     }
 
+    private static DOMActionService getDomActionService(final DOMMountPoint mountPoint) {
+        return getMountPointService(mountPoint, DOMActionService.class);
+    }
+
     private static <T extends DOMService> T getMountPointService(final DOMMountPoint mountPoint,
             final Class<T> serviceClass) {
         final Optional<T> maybeService = mountPoint.getService(serviceClass);
@@ -657,9 +674,8 @@ public class MountPointEndToEndTest {
     }
 
     private DOMMountPoint awaitMountPoint(final DOMMountPointService mountPointService) {
-        await().atMost(5, TimeUnit.SECONDS).until(() -> {
-            return mountPointService.getMountPoint(yangNodeInstanceId).isPresent();
-        });
+        await().atMost(5, TimeUnit.SECONDS).until(() ->
+                mountPointService.getMountPoint(yangNodeInstanceId).isPresent());
 
         return mountPointService.getMountPoint(yangNodeInstanceId).get();
     }
@@ -680,16 +696,16 @@ public class MountPointEndToEndTest {
 
     private static class TopDOMRpcImplementation implements DOMRpcImplementation {
         private volatile SettableFuture<Entry<DOMRpcIdentifier, NormalizedNode<?, ?>>> rpcInvokedFuture;
-        private volatile CheckedFuture<DOMRpcResult, DOMRpcException> returnFuture;
+        private volatile FluentFuture<DOMRpcResult> returnFuture;
 
         @Override
-        public CheckedFuture<DOMRpcResult, DOMRpcException> invokeRpc(final DOMRpcIdentifier rpc,
+        public FluentFuture<DOMRpcResult> invokeRpc(final DOMRpcIdentifier rpc,
                 final NormalizedNode<?, ?> input) {
             rpcInvokedFuture.set(new SimpleEntry<>(rpc, input));
             return returnFuture;
         }
 
-        void init(final CheckedFuture<DOMRpcResult, DOMRpcException> retFuture) {
+        void init(final FluentFuture<DOMRpcResult> retFuture) {
             this.returnFuture = retFuture;
             rpcInvokedFuture = SettableFuture.create();
         }