Bug 6170 + Bug 5919 - made FRS cluster-aware
[openflowplugin.git] / applications / forwardingrules-sync / src / test / java / org / opendaylight / openflowplugin / applications / frsync / impl / SimplifiedConfigListenerTest.java
index 4c20088ded8fa1897bc91bf5c00357c90e348e02..c0ef37e34efd5721980655a8ec9d6aaaa9db7ebb 100644 (file)
@@ -46,7 +46,7 @@ public class SimplifiedConfigListenerTest {
     private static final NodeId NODE_ID = new NodeId("testNode");
     private InstanceIdentifier<FlowCapableNode> fcNodePath;
     private SimplifiedConfigListener nodeListenerConfig;
-    private LogicalDatastoreType dsType = LogicalDatastoreType.CONFIGURATION;
+    private final LogicalDatastoreType dsType = LogicalDatastoreType.CONFIGURATION;
 
     @Mock
     private SyncReactor reactor;
@@ -92,6 +92,7 @@ public class SimplifiedConfigListenerTest {
     public void testOnDataTreeChangedSyncupAdd() throws InterruptedException {
         Mockito.when(roTx.read(LogicalDatastoreType.OPERATIONAL, fcNodePath))
                 .thenReturn(Futures.immediateCheckedFuture(Optional.of(dataBefore)));
+        Mockito.when(configModification.getDataBefore()).thenReturn(null);
         Mockito.when(configModification.getDataAfter()).thenReturn(dataAfter);
 
         nodeListenerConfig.onDataTreeChanged(Collections.singleton(dataTreeModification));
@@ -120,6 +121,7 @@ public class SimplifiedConfigListenerTest {
         Mockito.when(roTx.read(LogicalDatastoreType.OPERATIONAL, fcNodePath))
                 .thenReturn(Futures.immediateCheckedFuture(Optional.of(dataBefore)));
         Mockito.when(configModification.getDataBefore()).thenReturn(dataBefore);
+        Mockito.when(configModification.getDataAfter()).thenReturn(null);
 
         nodeListenerConfig.onDataTreeChanged(Collections.singleton(dataTreeModification));
 
@@ -138,4 +140,5 @@ public class SimplifiedConfigListenerTest {
         Mockito.verifyZeroInteractions(reactor);
         Mockito.verify(roTx).close();
     }
+
 }
\ No newline at end of file