X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-client%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fclient%2FNetconfClientSessionNegotiatorFactoryTest.java;h=ecb14cc84dbd8f902e424be893984dc198082774;hb=4497e2212e73e13356447b9644bbdc935411949a;hp=0557a0c26890f0a6c25c178745ea48aa27472f99;hpb=a277626b53741281883b1f414ef1885beb489f49;p=controller.git diff --git a/opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiatorFactoryTest.java b/opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiatorFactoryTest.java index 0557a0c268..ecb14cc84d 100644 --- a/opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiatorFactoryTest.java +++ b/opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiatorFactoryTest.java @@ -8,36 +8,34 @@ package org.opendaylight.controller.netconf.client; +import static org.junit.Assert.assertNotNull; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.mock; + import com.google.common.base.Optional; import io.netty.channel.Channel; import io.netty.util.HashedWheelTimer; import io.netty.util.Timer; import io.netty.util.concurrent.Promise; -import org.apache.sshd.common.SessionListener; import org.junit.Test; import org.opendaylight.controller.netconf.util.messages.NetconfHelloMessageAdditionalHeader; import org.opendaylight.protocol.framework.SessionListenerFactory; import org.opendaylight.protocol.framework.SessionNegotiator; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; - public class NetconfClientSessionNegotiatorFactoryTest { @Test public void testGetSessionNegotiator() throws Exception { NetconfClientSessionListener sessionListener = mock(NetconfClientSessionListener.class); Timer timer = new HashedWheelTimer(); - SessionListenerFactory listenerFactory = mock(SessionListenerFactory.class); + SessionListenerFactory listenerFactory = mock(SessionListenerFactory.class); doReturn(sessionListener).when(listenerFactory).getSessionListener(); Channel channel = mock(Channel.class); - Promise promise = mock(Promise.class); + Promise promise = mock(Promise.class); NetconfClientSessionNegotiatorFactory negotiatorFactory = new NetconfClientSessionNegotiatorFactory(timer, Optional.absent(), 200L); - SessionNegotiator sessionNegotiator = negotiatorFactory.getSessionNegotiator(listenerFactory, channel, promise); + SessionNegotiator sessionNegotiator = negotiatorFactory.getSessionNegotiator(listenerFactory, channel, promise); assertNotNull(sessionNegotiator); } }