- EXIOptions exiOptions = new EXIOptions();
- NetconfStartExiMessage exiMessage = NetconfStartExiMessage.create(exiOptions, "msg-id");
- doReturn(promise).when(promise).setSuccess(anyObject());
+ doReturn(false).when(promise).isDone();
+ doReturn(promise).when(promise).setSuccess(any());
+ NetconfClientSessionNegotiator negotiator = createNetconfClientSessionNegotiator(promise, null);
+ Set<String> caps = Sets.newSet("a", "b");
+ NetconfHelloMessage helloServerMessage = NetconfHelloMessage.createServerHello(caps, 10);
+
+ negotiator.handleMessage(helloServerMessage);
+ negotiator.channelActive(null);
+
+ verify(promise).setSuccess(any());
+ }
+
+ @Test
+ public void testNetconfClientSessionNegotiatorWithEXI() throws Exception {
+ Promise<NetconfClientSession> promise = mock(Promise.class);
+ NetconfStartExiMessage exiMessage = NetconfStartExiMessage.create(EXIParameters.empty(), "msg-id");
+ doReturn(promise).when(promise).setSuccess(any());