BGPCEP-754: Rework EffectiveRibInWriter
[bgpcep.git] / bgp / flowspec / src / test / java / org / opendaylight / protocol / bgp / flowspec / FlowspecL3vpnIpv4RIBSupportTest.java
index 82c971d8e3ba4757f63d8a03bb488cc059f502a0..3dc71bbc56d65f41bf7b9db0efe9ee7268d3cc97 100644 (file)
@@ -141,11 +141,8 @@ public class FlowspecL3vpnIpv4RIBSupportTest extends AbstractRIBSupportTest {
 
     @Test
     public void testRouteIdAddPath() {
-        final YangInstanceIdentifier.NodeIdentifierWithPredicates expected = createRouteNIWP(new FlowspecL3vpnIpv4RoutesBuilder().
-            setFlowspecL3vpnRoute(Collections.singletonList(ROUTE)).build());
-        final YangInstanceIdentifier.NodeIdentifierWithPredicates prefixNii = new YangInstanceIdentifier.NodeIdentifierWithPredicates(RIB_SUPPORT.routeQName(),
-            ImmutableMap.of(RIB_SUPPORT.routeKeyQName(), ROUTE_KEY.getRouteKey()));
-        Assert.assertEquals(expected, RIB_SUPPORT.getRouteIdAddPath(AbstractRIBSupportTest.PATH_ID, prefixNii));
+        final FlowspecL3vpnRouteKey oldKey = new FlowspecL3vpnRouteKey(new PathId(100L), ROUTE_KEY.getRouteKey());
+        Assert.assertEquals(ROUTE_KEY, RIB_SUPPORT.createNewRouteKey(AbstractRIBSupportTest.PATH_ID, oldKey));
     }
 
     @Test
@@ -156,7 +153,7 @@ public class FlowspecL3vpnIpv4RIBSupportTest extends AbstractRIBSupportTest {
 
     @Test
     public void testExtractPathId() {
-        Assert.assertEquals((Long) NON_PATH_ID, RIB_SUPPORT.extractPathId(null));
+        Assert.assertEquals(NON_PATH_ID, RIB_SUPPORT.extractPathId(null));
     }
 
     @Test
@@ -185,16 +182,16 @@ public class FlowspecL3vpnIpv4RIBSupportTest extends AbstractRIBSupportTest {
     public void testChangedRoutes() {
         final Routes emptyCase = new FlowspecL3vpnIpv4RoutesCaseBuilder().build();
         DataTreeCandidateNode tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyCase)).getRootNode();
-        Assert.assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
+        Assert.assertTrue(RIB_SUPPORT.changedDOMRoutes(tree).isEmpty());
 
         final Routes emptyRoutes = new FlowspecL3vpnIpv4RoutesCaseBuilder().setFlowspecL3vpnIpv4Routes(new FlowspecL3vpnIpv4RoutesBuilder().build()).build();
         tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(emptyRoutes)).getRootNode();
-        Assert.assertTrue(RIB_SUPPORT.changedRoutes(tree).isEmpty());
+        Assert.assertTrue(RIB_SUPPORT.changedDOMRoutes(tree).isEmpty());
 
         final Routes routes = new FlowspecL3vpnIpv4RoutesCaseBuilder().setFlowspecL3vpnIpv4Routes(new FlowspecL3vpnIpv4RoutesBuilder()
             .setFlowspecL3vpnRoute(Collections.singletonList(ROUTE)).build()).build();
         tree = DataTreeCandidates.fromNormalizedNode(getRoutePath(), createRoutes(routes)).getRootNode();
-        final Collection<DataTreeCandidateNode> result = RIB_SUPPORT.changedRoutes(tree);
+        final Collection<DataTreeCandidateNode> result = RIB_SUPPORT.changedDOMRoutes(tree);
         Assert.assertFalse(result.isEmpty());
     }
 }