package org.opendaylight.openflowplugin.impl.statistics.services.direct;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.when;
import java.math.BigInteger;
.child(Node.class, new NodeKey(new NodeId(NODE_ID)));
convertorManager = ConvertorManagerFactory.createDefaultManager();
- when(deviceContext.getDeviceFlowRegistry()).thenReturn(deviceFlowRegistry);
- when(deviceContext.getDeviceGroupRegistry()).thenReturn(deviceGroupRegistry);
- when(deviceContext.getDeviceMeterRegistry()).thenReturn(deviceMeterRegistry);
+ lenient().when(deviceContext.getDeviceFlowRegistry()).thenReturn(deviceFlowRegistry);
+ lenient().when(deviceContext.getDeviceGroupRegistry()).thenReturn(deviceGroupRegistry);
+ lenient().when(deviceContext.getDeviceMeterRegistry()).thenReturn(deviceMeterRegistry);
when(deviceContext.getPrimaryConnectionContext()).thenReturn(connectionContext);
when(deviceContext.getMessageSpy()).thenReturn(messageSpy);
- when(deviceContext.getMultiMsgCollector(any())).thenReturn(multiMsgCollector);
- when(deviceContext.oook()).thenReturn(translatorLibrary);
- when(deviceContext.getDeviceState()).thenReturn(deviceState);
+ lenient().when(deviceContext.getMultiMsgCollector(any())).thenReturn(multiMsgCollector);
+ lenient().when(deviceContext.oook()).thenReturn(translatorLibrary);
+ lenient().when(deviceContext.getDeviceState()).thenReturn(deviceState);
when(deviceContext.getDeviceInfo()).thenReturn(deviceInfo);
when(deviceInfo.getNodeInstanceIdentifier()).thenReturn(nodeInstanceIdentifier);
- when(deviceInfo.getNodeId()).thenReturn(new NodeId(NODE_ID));
+ lenient().when(deviceInfo.getNodeId()).thenReturn(new NodeId(NODE_ID));
when(deviceInfo.getVersion()).thenReturn(OF_VERSION);
when(deviceInfo.getDatapathId()).thenReturn(DATAPATH_ID);
- when(getFeaturesOutput.getVersion()).thenReturn(OF_VERSION);
- when(getFeaturesOutput.getDatapathId()).thenReturn(DATAPATH_ID);
+ lenient().when(getFeaturesOutput.getVersion()).thenReturn(OF_VERSION);
+ lenient().when(getFeaturesOutput.getDatapathId()).thenReturn(DATAPATH_ID);
when(connectionContext.getFeatures()).thenReturn(features);
- when(connectionContext.getOutboundQueueProvider()).thenReturn(outboundQueueProvider);
- when(features.getVersion()).thenReturn(OF_VERSION);
- when(features.getDatapathId()).thenReturn(DATAPATH_ID);
+ lenient().when(connectionContext.getOutboundQueueProvider()).thenReturn(outboundQueueProvider);
+ lenient().when(features.getVersion()).thenReturn(OF_VERSION);
+ lenient().when(features.getDatapathId()).thenReturn(DATAPATH_ID);
multipartWriterProvider = MultipartWriterProviderFactory.createDefaultProvider(deviceContext);
setUp();
}