Provide Add Path support for all AFI/SAFI
[bgpcep.git] / bgp / rib-impl / src / test / java / org / opendaylight / protocol / bgp / rib / impl / RouteUpdateKeyTest.java
index 1ae61f1c7afde32af8928f0356e201076d82508f..94b987f6875b08bc6b28db0f33b708df60e1aa9a 100644 (file)
@@ -15,28 +15,23 @@ import static org.junit.Assert.assertTrue;
 import com.google.common.primitives.UnsignedInteger;
 import org.junit.Test;
 import org.opendaylight.protocol.bgp.rib.spi.RouterIds;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv4.routes.ipv4.routes.Ipv4RouteKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.PathId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.PeerId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.PeerId;
 
 public class RouteUpdateKeyTest {
     private static final UnsignedInteger PEER_ID = RouterIds.routerIdForPeerId(new PeerId("bgp://127.0.0.1"));
     private static final UnsignedInteger PEER_ID_2 = RouterIds.routerIdForPeerId(new PeerId("bgp://127.0.0.2"));
-    private static final Ipv4RouteKey NIWP_PEER = new Ipv4RouteKey(new PathId(1L),
-            new Ipv4Prefix("0.0.0.0/0"));
-    private static final Ipv4RouteKey NIWP_PEER2 = new Ipv4RouteKey(new PathId(1L),
-            new Ipv4Prefix("1.1.1.1/24"));
+    private static final String PREFIX = "0.0.0.0/0";
+    private static final String PREFIX_2 = "1.1.1.1/24";
 
     @Test
     public void testRouteUpdateKey() {
-        final RouteUpdateKey rk = new RouteUpdateKey(PEER_ID, NIWP_PEER);
+        final RouteUpdateKey rk = new RouteUpdateKey(PEER_ID, PREFIX);
         assertEquals(PEER_ID, rk.getPeerId());
-        assertEquals(NIWP_PEER, rk.getRouteId());
-        assertTrue(rk.equals(new RouteUpdateKey(PEER_ID, NIWP_PEER)));
+        assertEquals(PREFIX, rk.getRouteId());
+        assertTrue(rk.equals(new RouteUpdateKey(PEER_ID, PREFIX)));
         assertTrue(rk.equals(rk));
         assertFalse(rk.equals(null));
-        assertFalse(rk.equals(new RouteUpdateKey(PEER_ID_2, NIWP_PEER)));
-        assertFalse(rk.equals(new RouteUpdateKey(PEER_ID_2, NIWP_PEER2)));
+        assertFalse(rk.equals(new RouteUpdateKey(PEER_ID_2, PREFIX)));
+        assertFalse(rk.equals(new RouteUpdateKey(PEER_ID_2, PREFIX_2)));
     }
 }
\ No newline at end of file