X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fcallhome-protocol%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fcallhome%2Fprotocol%2FNetconfCallHomeServerTest.java;h=e400f5e66f35ab6755919aae8f53b0a0d2206b89;hb=2401a0b4ea5e95292b6d7a23274992c5b57f5149;hp=27b829e0ef5d8eacce9a1e782cfea27b14d7a5ec;hpb=effdc431d42558c582b8879a08239c9975980fba;p=netconf.git diff --git a/netconf/callhome-protocol/src/test/java/org/opendaylight/netconf/callhome/protocol/NetconfCallHomeServerTest.java b/netconf/callhome-protocol/src/test/java/org/opendaylight/netconf/callhome/protocol/NetconfCallHomeServerTest.java index 27b829e0ef..e400f5e66f 100644 --- a/netconf/callhome-protocol/src/test/java/org/opendaylight/netconf/callhome/protocol/NetconfCallHomeServerTest.java +++ b/netconf/callhome-protocol/src/test/java/org/opendaylight/netconf/callhome/protocol/NetconfCallHomeServerTest.java @@ -33,6 +33,7 @@ import org.apache.sshd.common.future.SshFutureListener; import org.apache.sshd.common.io.IoAcceptor; import org.apache.sshd.common.io.IoHandler; import org.apache.sshd.common.io.IoServiceFactory; +import org.apache.sshd.common.kex.KeyExchange; import org.apache.sshd.common.session.Session; import org.apache.sshd.common.session.SessionListener; import org.junit.AfterClass; @@ -114,6 +115,12 @@ public class NetconfCallHomeServerTest { CallHomeSessionContext mockContext = mock(CallHomeSessionContext.class); doNothing().when(mockContext).openNetconfChannel(); doReturn(mockContext).when(mockSession).getAttribute(any(Session.AttributeKey.class)); + + final KeyExchange kex = mock(KeyExchange.class); + doReturn(kex).when(mockSession).getKex(); + final PublicKey serverKey = mock(PublicKey.class); + doReturn(serverKey).when(kex).getServerKey(); + SessionListener listener = instance.createSessionListener(); doReturn(mockAuthFuture).when(mockContext).authorize(); // when