BUG-459 Remove deprecated NetconfClient class.
[controller.git] / opendaylight / netconf / netconf-impl / src / test / java / org / opendaylight / controller / netconf / impl / ConcurrentClientsTest.java
index c1a7b1478b3edde41ea5f13004afc48df540c6bf..82e8caef3a1326f4a2ba6e21177add5abf9158c4 100644 (file)
@@ -21,7 +21,7 @@ import org.junit.Test;
 import org.mockito.Mock;
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.api.NetconfMessage;
-import org.opendaylight.controller.netconf.client.NetconfClient;
+import org.opendaylight.controller.netconf.client.test.TestingNetconfClient;
 import org.opendaylight.controller.netconf.client.NetconfClientDispatcher;
 import org.opendaylight.controller.netconf.impl.osgi.NetconfOperationServiceFactoryListenerImpl;
 import org.opendaylight.controller.netconf.impl.osgi.SessionMonitoringService;
@@ -259,13 +259,13 @@ public class ConcurrentClientsTest {
         @Override
         public void run() {
             try {
-                final NetconfClient netconfClient = new NetconfClient(clientId, netconfAddress, netconfClientDispatcher);
+                final TestingNetconfClient netconfClient = new TestingNetconfClient(clientId, netconfAddress, netconfClientDispatcher);
                 long sessionId = netconfClient.getSessionId();
                 logger.info("Client with sessionid {} hello exchanged", sessionId);
 
                 final NetconfMessage getMessage = XmlFileLoader
                         .xmlFileToNetconfMessage("netconfMessages/getConfig.xml");
-                NetconfMessage result = netconfClient.sendMessage(getMessage);
+                NetconfMessage result = netconfClient.sendRequest(getMessage).get();
                 logger.info("Client with sessionid {} got result {}", sessionId, result);
                 netconfClient.close();
                 logger.info("Client with session id {} ended", sessionId);