import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
final DOMRpcResult result = new DefaultDOMRpcResult(Builders.containerBuilder().withNodeIdentifier(
new YangInstanceIdentifier.NodeIdentifier(NetconfMessageTransformUtil.NETCONF_RUNNING_QNAME)).build());
final DOMRpcResult result = new DefaultDOMRpcResult(Builders.containerBuilder().withNodeIdentifier(
new YangInstanceIdentifier.NodeIdentifier(NetconfMessageTransformUtil.NETCONF_RUNNING_QNAME)).build());
doReturn(Futures.immediateCheckedFuture(result))
.when(deviceRpc).invokeRpc(any(SchemaPath.class), any(NormalizedNode.class));
keepaliveSalFacade.onDeviceConnected(null, null, deviceRpc);
verify(underlyingSalFacade).onDeviceConnected(
doReturn(Futures.immediateCheckedFuture(result))
.when(deviceRpc).invokeRpc(any(SchemaPath.class), any(NormalizedNode.class));
keepaliveSalFacade.onDeviceConnected(null, null, deviceRpc);
verify(underlyingSalFacade).onDeviceConnected(
- any(SchemaContext.class), any(NetconfSessionPreferences.class), any(DOMRpcService.class));
+ isNull(), isNull(), any(DOMRpcService.class), isNull());
verify(deviceRpc, timeout(15000).times(5)).invokeRpc(any(SchemaPath.class), any(NormalizedNode.class));
}
verify(deviceRpc, timeout(15000).times(5)).invokeRpc(any(SchemaPath.class), any(NormalizedNode.class));
}
- verify(underlyingSalFacade).onDeviceConnected(
- any(SchemaContext.class), any(NetconfSessionPreferences.class), any(DOMRpcService.class));
+ verify(underlyingSalFacade).onDeviceConnected(isNull(), isNull(), any(DOMRpcService.class), isNull());
// Should disconnect the session
verify(listener, timeout(15000).times(1)).disconnect();
// Should disconnect the session
verify(listener, timeout(15000).times(1)).disconnect();
- verify(underlyingSalFacade).onDeviceConnected(
- any(SchemaContext.class), any(NetconfSessionPreferences.class), any(DOMRpcService.class));
+ verify(underlyingSalFacade).onDeviceConnected(isNull(), isNull(), any(DOMRpcService.class), isNull());
+
// Shouldn't disconnect the session
verify(listener, times(0)).disconnect();
// Shouldn't disconnect the session
verify(listener, times(0)).disconnect();
- }).when(underlyingSalFacade).onDeviceConnected(
- any(SchemaContext.class), any(NetconfSessionPreferences.class), any(DOMRpcService.class));
+ }).when(underlyingSalFacade).onDeviceConnected(isNull(), isNull(), any(DOMRpcService.class), isNull());
doReturn(Futures.immediateFailedCheckedFuture(new IllegalStateException("illegal-state")))
.when(deviceRpc).invokeRpc(any(SchemaPath.class), any(NormalizedNode.class));
doReturn(Futures.immediateFailedCheckedFuture(new IllegalStateException("illegal-state")))
.when(deviceRpc).invokeRpc(any(SchemaPath.class), any(NormalizedNode.class));