- when(mockedPrimConnectionContext.getFeatures()).thenReturn(mockedFeatures);
- when(mockedPrimConnectionContext.getConnectionAdapter()).thenReturn(mockedConnectionAdapter);
- when(mockedPrimConnectionContext.getConnectionState()).thenReturn(ConnectionContext.CONNECTION_STATE.WORKING);
- when(mockedPrimConnectionContext.getNodeId()).thenReturn(NODE_ID);
- when(mockedPrimConnectionContext.getOutboundQueueProvider()).thenReturn(outboundQueue);
-
- when(mockedDeviceState.isFlowStatisticsAvailable()).thenReturn(Boolean.TRUE);
- when(mockedDeviceState.isGroupAvailable()).thenReturn(Boolean.TRUE);
- when(mockedDeviceState.isMetersAvailable()).thenReturn(Boolean.TRUE);
- when(mockedDeviceState.isPortStatisticsAvailable()).thenReturn(Boolean.TRUE);
- when(mockedDeviceState.isQueueStatisticsAvailable()).thenReturn(Boolean.TRUE);
- when(mockedDeviceState.isTableStatisticsAvailable()).thenReturn(Boolean.TRUE);
- when(mockedDeviceInfo.getNodeInstanceIdentifier()).thenReturn(nodePath);
- when(mockedDeviceInfo.getDatapathId()).thenReturn(BigInteger.TEN);
- when(mockedDeviceInfo.getNodeId()).thenReturn(NODE_ID);
-
- when(mockedDeviceContext.getDeviceInfo()).thenReturn(mockedDeviceInfo);
- when(mockedDeviceContext.getPrimaryConnectionContext()).thenReturn(mockedPrimConnectionContext);
- when(mockedDeviceContext.getMessageSpy()).thenReturn(mockedMessagSpy);
- when(mockedDeviceContext.getDeviceFlowRegistry())
- .thenReturn(new DeviceFlowRegistryImpl(OFConstants.OFP_VERSION_1_3, dataBroker, nodePath));
- when(mockedDeviceContext.getDeviceState()).thenReturn(mockedDeviceState);
- when(mockedDeviceContext.getMultiMsgCollector(
- Matchers.<RequestContext<List<MultipartReply>>>any())).thenAnswer(
- invocation -> {
- currentRequestContext = (RequestContext<List<MultipartReply>>) invocation.getArguments()[0];
- return multiMagCollector;
- });