X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Frpc%2FRpcContextImplTest.java;h=9d982028a88f49c8b6dfae2d0115cdc99cc43537;hb=5225848e57f10d051355f649df8d1ae4ec0c068c;hp=f523828cb17d9c76dac987c531dbc1855e352cac;hpb=70c266f1eef0a823f29c4ad119a1e8f7e6164507;p=openflowplugin.git diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/rpc/RpcContextImplTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/rpc/RpcContextImplTest.java index f523828cb1..9d982028a8 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/rpc/RpcContextImplTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/rpc/RpcContextImplTest.java @@ -12,6 +12,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; + import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -21,6 +22,7 @@ import org.mockito.runners.MockitoJUnitRunner; import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext; +import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo; import org.opendaylight.openflowplugin.api.openflow.device.DeviceState; import org.opendaylight.openflowplugin.api.openflow.device.RequestContext; import org.opendaylight.openflowplugin.api.openflow.device.XidSequencer; @@ -58,6 +60,8 @@ public class RpcContextImplTest { private NotificationPublishService notificationPublishService; @Mock private TestRpcService serviceInstance; + @Mock + private DeviceInfo deviceInfo; private KeyedInstanceIdentifier nodeInstanceIdentifier; @@ -67,7 +71,7 @@ public class RpcContextImplTest { nodeInstanceIdentifier = InstanceIdentifier.create(Nodes.class).child(Node.class, new NodeKey(nodeId)); when(deviceContext.getDeviceState()).thenReturn(deviceState); - when(deviceState.getNodeInstanceIdentifier()).thenReturn(nodeInstanceIdentifier); + when(deviceInfo.getNodeInstanceIdentifier()).thenReturn(nodeInstanceIdentifier); when(deviceContext.getMessageSpy()).thenReturn(messageSpy); rpcContext = new RpcContextImpl(rpcProviderRegistry,deviceContext, messageSpy, MAX_REQUESTS,nodeInstanceIdentifier);