import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.runners.MockitoJUnitRunner;
.setVersion(OFConstants.OFP_VERSION_1_3)
.build();
- Mockito.when(deviceInfo.getNodeId()).thenReturn(nodeKey.getId());
Mockito.when(deviceInfo.getNodeInstanceIdentifier()).thenReturn(nodePath);
- Mockito.when(connectionContext.getFeatures()).thenReturn(features);
- Mockito.when(deviceContext.getPrimaryConnectionContext()).thenReturn(connectionContext);
- Mockito.when(deviceContext.getDeviceState()).thenReturn(deviceState);
Mockito.when(deviceContext.getDeviceInfo()).thenReturn(deviceInfo);
Mockito.when(deviceContext.getMessageSpy()).thenReturn(messageSpy);
- Mockito.when(rpcProviderRegistry.addRoutedRpcImplementation(
- Matchers.any(), Matchers.any(RpcService.class)))
- .thenReturn(routedRpcRegistration);
- Mockito.when(contexts.remove(deviceInfo)).thenReturn(removedContexts);
}
@Test