Suppress warnings of intent related test codes and add some comments
Change-Id: Iedad7aa1cdba5bc7c6a52d591b7ba7905e72bf63
diff --git a/src/test/java/net/onrc/onos/core/intent/runtime/PathCalcRuntimeModuleTest.java b/src/test/java/net/onrc/onos/core/intent/runtime/PathCalcRuntimeModuleTest.java
index 421d2fa..17f5788 100644
--- a/src/test/java/net/onrc/onos/core/intent/runtime/PathCalcRuntimeModuleTest.java
+++ b/src/test/java/net/onrc/onos/core/intent/runtime/PathCalcRuntimeModuleTest.java
@@ -70,6 +70,8 @@
private IControllerRegistryService controllerRegistryService;
private PersistIntent persistIntent;
private MockNetworkGraph graph;
+ private IEventChannel<Long, IntentOperationList> intentOperationChannel;
+ private IEventChannel<Long, IntentStateList> intentStateChannel;
@SuppressWarnings("unchecked")
@Before
@@ -81,7 +83,8 @@
networkGraphService = createMock(INetworkGraphService.class);
controllerRegistryService = createMock(IControllerRegistryService.class);
modContext = createMock(FloodlightModuleContext.class);
- final IEventChannel eventChannel = createMock(IEventChannel.class);
+ intentOperationChannel = createMock(IEventChannel.class);
+ intentStateChannel = createMock(IEventChannel.class);
persistIntent = PowerMock.createMock(PersistIntent.class);
PowerMock.expectNew(PersistIntent.class,
@@ -106,14 +109,14 @@
expect(datagridService.createChannel("onos.pathintent",
Long.class, IntentOperationList.class))
- .andReturn(eventChannel).once();
+ .andReturn(intentOperationChannel).once();
expect(datagridService.addListener(
eq("onos.pathintent_state"),
anyObject(IEventChannelListener.class),
eq(Long.class),
eq(IntentStateList.class)))
- .andReturn(eventChannel).once();
+ .andReturn(intentStateChannel).once();
replay(datagridService);
replay(networkGraphService);