- Mockito.when(deviceContext.getPrimaryConnectionContext()).thenReturn(connectionContext);
- Mockito.when(connectionContext.getFeatures()).thenReturn(featuresReply);
- Mockito.when(featuresReply.getDatapathId()).thenReturn(BigInteger.TEN);
- Mockito.when(deviceContext.getDeviceState()).thenReturn(deviceState);
- Mockito.when(deviceInfo.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);