Add branch for creating TLS client
[netconf.git] / netconf / netconf-client / src / test / java / org / opendaylight / netconf / client / NetconfClientDispatcherImplTest.java
index 82bbe001381154707cb111422ff8190791508092..45019fede49267a05b1ec864e1994c2a8b5c0114 100644 (file)
@@ -95,5 +95,21 @@ public class NetconfClientDispatcherImplTest {
         assertNotNull(sshReconn);
         assertNotNull(tcpReconn);
 
+        SslHandlerFactory sslHandlerFactory = Mockito.mock(SslHandlerFactory.class);
+        NetconfReconnectingClientConfiguration cfg3 = NetconfReconnectingClientConfigurationBuilder.create()
+                .withProtocol(NetconfClientConfiguration.NetconfClientProtocol.TLS)
+                .withAddress(address)
+                .withConnectionTimeoutMillis(timeout)
+                .withReconnectStrategy(reconnect)
+                .withAdditionalHeader(header)
+                .withSessionListener(listener)
+                .withConnectStrategyFactory(reconnectStrategyFactory)
+                .withSslHandlerFactory(sslHandlerFactory).build();
+
+        Future<NetconfClientSession> tlsSession = dispatcher.createClient(cfg3);
+        Future<Void> tlsReconn = dispatcher.createReconnectingClient(cfg3);
+
+        assertNotNull(tlsSession);
+        assertNotNull(tlsReconn);
     }
 }