Bump upstreams to 2022.09
[bgpcep.git] / bgp / parser-spi / src / test / java / org / opendaylight / protocol / bgp / parser / spi / pojo / MultiPathSupportImplTest.java
index 0abaf61c762e58ca623346fc212bdc1534bc845e..49e487dea55e21a1a7635cb1c9a6ddbd27f0011e 100644 (file)
@@ -5,10 +5,9 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.protocol.bgp.parser.spi.pojo;
 
-import com.google.common.collect.Lists;
+import java.util.ArrayList;
 import java.util.List;
 import org.junit.Assert;
 import org.junit.Test;
@@ -18,25 +17,29 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mult
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.SendReceive;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.mp.capabilities.add.path.capability.AddressFamilies;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.mp.capabilities.add.path.capability.AddressFamiliesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.Ipv4AddressFamily;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.Ipv6AddressFamily;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.MplsLabeledVpnSubsequentAddressFamily;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.UnicastSubsequentAddressFamily;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv4AddressFamily;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv6AddressFamily;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.MplsLabeledVpnSubsequentAddressFamily;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.UnicastSubsequentAddressFamily;
 
 public class MultiPathSupportImplTest {
 
-    @Test(expected=NullPointerException.class)
+    @Test(expected = NullPointerException.class)
     public void testcreateParserMultiPathSupportNull() {
         MultiPathSupportImpl.createParserMultiPathSupport(null);
     }
 
     @Test
     public void testIsTableTypeSupported() {
-        final List<AddressFamilies> supportedTables = Lists.newArrayList();
-        final BgpTableType ipv4Unicast = new BgpTableTypeImpl(Ipv4AddressFamily.class, UnicastSubsequentAddressFamily.class);
-        final BgpTableType ipv4L3vpn = new BgpTableTypeImpl(Ipv4AddressFamily.class, MplsLabeledVpnSubsequentAddressFamily.class);
-        final BgpTableType ipv6Unicast = new BgpTableTypeImpl(Ipv6AddressFamily.class, UnicastSubsequentAddressFamily.class);
-        final BgpTableType ipv6L3vpn = new BgpTableTypeImpl(Ipv6AddressFamily.class, MplsLabeledVpnSubsequentAddressFamily.class);
+        final List<AddressFamilies> supportedTables = new ArrayList<>();
+        final BgpTableType ipv4Unicast = new BgpTableTypeImpl(Ipv4AddressFamily.VALUE,
+            UnicastSubsequentAddressFamily.VALUE);
+        final BgpTableType ipv4L3vpn = new BgpTableTypeImpl(Ipv4AddressFamily.VALUE,
+            MplsLabeledVpnSubsequentAddressFamily.VALUE);
+        final BgpTableType ipv6Unicast = new BgpTableTypeImpl(Ipv6AddressFamily.VALUE,
+            UnicastSubsequentAddressFamily.VALUE);
+        final BgpTableType ipv6L3vpn = new BgpTableTypeImpl(Ipv6AddressFamily.VALUE,
+            MplsLabeledVpnSubsequentAddressFamily.VALUE);
         supportedTables.add(createAddPathCapability(ipv4Unicast, SendReceive.Send));
         supportedTables.add(createAddPathCapability(ipv4L3vpn, SendReceive.Receive));
         supportedTables.add(createAddPathCapability(ipv6Unicast, SendReceive.Both));
@@ -49,7 +52,8 @@ public class MultiPathSupportImplTest {
     }
 
     private static AddressFamilies createAddPathCapability(final BgpTableType afisafi, final SendReceive mode) {
-        return new AddressFamiliesBuilder().setAfi(afisafi.getAfi()).setSafi(afisafi.getSafi()).setSendReceive(mode).build();
+        return new AddressFamiliesBuilder().setAfi(afisafi.getAfi()).setSafi(afisafi.getSafi()).setSendReceive(mode)
+                .build();
     }
 
 }