Cleanup deprecation warnings in bgp/extensions/labeled-unicast
[bgpcep.git] / bgp / extensions / labeled-unicast / src / test / java / org / opendaylight / protocol / bgp / labeled / unicast / LUNlriParserTest.java
index 52cfd04bfa48616a449c4ace450bef544399801e..d3f2ee7d16ab0f473a1d4ef013e7205782529286 100644 (file)
@@ -38,9 +38,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labe
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.update.attributes.mp.reach.nlri.advertized.routes.destination.type.destination.labeled.unicast._case.DestinationLabeledUnicastBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.Attributes2Builder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlriBuilder;
@@ -257,8 +255,9 @@ public class LUNlriParserTest {
 
         //test serializer
         final ByteBuf output = Unpooled.buffer();
-        parser.serializeAttribute(new AttributesBuilder().addAugmentation(Attributes1.class,
-            new Attributes1Builder().setMpReachNlri(mpReachExpected).build()).build(), output);
+        parser.serializeAttribute(new AttributesBuilder()
+            .addAugmentation(new Attributes1Builder().setMpReachNlri(mpReachExpected).build())
+            .build(), output);
         assertArrayEquals(LU_REACH_NLRI_IPV4, ByteArray.readAllBytes(output));
     }
 
@@ -285,8 +284,9 @@ public class LUNlriParserTest {
 
         //test serializer
         final ByteBuf output = Unpooled.buffer();
-        parser.serializeAttribute(new AttributesBuilder().addAugmentation(Attributes1.class,
-            new Attributes1Builder().setMpReachNlri(mpReachExpected).build()).build(), output);
+        parser.serializeAttribute(new AttributesBuilder()
+            .addAugmentation(new Attributes1Builder().setMpReachNlri(mpReachExpected).build())
+            .build(), output);
         assertArrayEquals(LU_REACH_NLRI_IPV4_ADD_PATH, ByteArray.readAllBytes(output));
     }
 
@@ -329,13 +329,15 @@ public class LUNlriParserTest {
 
         //test serializer
         final ByteBuf output = Unpooled.buffer();
-        parser.serializeAttribute(new AttributesBuilder().addAugmentation(Attributes2.class,
-            new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build()).build(), output);
+        parser.serializeAttribute(new AttributesBuilder()
+            .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build())
+            .build(), output);
         assertArrayEquals(LU_UNREACH_NLRI_IPV4, ByteArray.readAllBytes(output));
 
         final ByteBuf output1 = Unpooled.buffer();
-        parser.serializeAttribute(new AttributesBuilder().addAugmentation(Attributes2.class,
-            new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected1).build()).build(), output1);
+        parser.serializeAttribute(new AttributesBuilder()
+            .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected1).build())
+            .build(), output1);
         assertArrayEquals(LU_UNREACH_NLRI_IPV4, ByteArray.readAllBytes(output1));
     }
 
@@ -379,13 +381,15 @@ public class LUNlriParserTest {
 
         //test serializer
         final ByteBuf output = Unpooled.buffer();
-        parser.serializeAttribute(new AttributesBuilder().addAugmentation(Attributes2.class,
-            new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build()).build(), output);
+        parser.serializeAttribute(new AttributesBuilder()
+            .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build())
+            .build(), output);
         assertArrayEquals(LU_UNREACH_NLRI_IPV4_ADD_PATH, ByteArray.readAllBytes(output));
 
         final ByteBuf output1 = Unpooled.buffer();
-        parser.serializeAttribute(new AttributesBuilder().addAugmentation(Attributes2.class,
-            new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected1).build()).build(), output1);
+        parser.serializeAttribute(new AttributesBuilder()
+            .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected1).build())
+            .build(), output1);
         assertArrayEquals(LU_UNREACH_NLRI_IPV4_ADD_PATH, ByteArray.readAllBytes(output1));
     }
 
@@ -413,8 +417,9 @@ public class LUNlriParserTest {
 
         //test serializer
         final ByteBuf output = Unpooled.buffer();
-        parser.serializeAttribute(new AttributesBuilder().addAugmentation(Attributes1.class,
-            new Attributes1Builder().setMpReachNlri(mpReachExpected).build()).build(), output);
+        parser.serializeAttribute(new AttributesBuilder()
+            .addAugmentation(new Attributes1Builder().setMpReachNlri(mpReachExpected).build())
+            .build(), output);
         assertArrayEquals(LU_REACH_NLRI_IPV6, ByteArray.readAllBytes(output));
     }
 
@@ -442,8 +447,9 @@ public class LUNlriParserTest {
 
         //test serializer
         final ByteBuf output = Unpooled.buffer();
-        parser.serializeAttribute(new AttributesBuilder().addAugmentation(Attributes1.class,
-            new Attributes1Builder().setMpReachNlri(mpReachExpected).build()).build(), output);
+        parser.serializeAttribute(new AttributesBuilder()
+            .addAugmentation(new Attributes1Builder().setMpReachNlri(mpReachExpected).build())
+            .build(), output);
         assertArrayEquals(LU_REACH_NLRI_IPV6_ADD_PATH, ByteArray.readAllBytes(output));
     }
 
@@ -484,13 +490,15 @@ public class LUNlriParserTest {
 
         //test serializer
         final ByteBuf output = Unpooled.buffer();
-        parser.serializeAttribute(new AttributesBuilder().addAugmentation(Attributes2.class,
-            new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build()).build(), output);
+        parser.serializeAttribute(new AttributesBuilder()
+            .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build())
+            .build(), output);
         assertArrayEquals(LU_UNREACH_NLRI_IPV6, ByteArray.readAllBytes(output));
 
         final ByteBuf output1 = Unpooled.buffer();
-        parser.serializeAttribute(new AttributesBuilder().addAugmentation(Attributes2.class,
-            new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected1).build()).build(), output1);
+        parser.serializeAttribute(new AttributesBuilder()
+            .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected1).build())
+            .build(), output1);
         assertArrayEquals(LU_UNREACH_NLRI_IPV6, ByteArray.readAllBytes(output1));
     }
 
@@ -533,13 +541,15 @@ public class LUNlriParserTest {
 
         //test serializer
         final ByteBuf output = Unpooled.buffer();
-        parser.serializeAttribute(new AttributesBuilder().addAugmentation(Attributes2.class,
-            new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build()).build(), output);
+        parser.serializeAttribute(new AttributesBuilder()
+            .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected2).build())
+            .build(), output);
         assertArrayEquals(LU_UNREACH_NLRI_IPV6_ADD_PATH, ByteArray.readAllBytes(output));
 
         final ByteBuf output1 = Unpooled.buffer();
-        parser.serializeAttribute(new AttributesBuilder().addAugmentation(Attributes2.class,
-            new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected1).build()).build(), output1);
+        parser.serializeAttribute(new AttributesBuilder()
+            .addAugmentation(new Attributes2Builder().setMpUnreachNlri(mpUnreachExpected1).build())
+            .build(), output1);
         assertArrayEquals(LU_UNREACH_NLRI_IPV6_ADD_PATH, ByteArray.readAllBytes(output1));
     }
 }