Remove use of junit-addons
[lispflowmapping.git] / mappingservice / lisp-proto / src / test / java / org / opendaylight / lispflowmapping / serializer / address / KeyValueAddressSerializerTest.java
index 22d846c2c62f0dce1bde807807ff7db481f693a3..63705aec749acb4c7c700135086665b5fd4dbd4b 100644 (file)
@@ -7,10 +7,10 @@
  */
 package org.opendaylight.lispflowmapping.serializer.address;
 
+import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 
 import java.nio.ByteBuffer;
-import junitx.framework.ArrayAssert;
 import org.junit.Test;
 import org.opendaylight.lispflowmapping.lisp.serializer.address.LispAddressSerializer;
 import org.opendaylight.lispflowmapping.lisp.serializer.exception.LispSerializationException;
@@ -33,7 +33,7 @@ public class KeyValueAddressSerializerTest extends BaseTestCase {
                 + "00 01 11 22 33 44 " // AFI=1, IP=0x11223344
                 + "00 01 22 33 44 55"), null); // AFI=1, IP=0x22334455
 
-        assertEquals(KeyValueAddressLcaf.class, address.getAddressType());
+        assertEquals(KeyValueAddressLcaf.VALUE, address.getAddressType());
         KeyValueAddress srcDestAddress = (KeyValueAddress) address.getAddress();
 
         assertEquals("17.34.51.68", srcDestAddress.getKeyValueAddress().getKey().stringValue());
@@ -42,17 +42,20 @@ public class KeyValueAddressSerializerTest extends BaseTestCase {
 
     @Test(expected = LispSerializationException.class)
     public void deserialize__ShorterBuffer() throws Exception {
-        LispAddressSerializer.getInstance().deserializeEid(hexToByteBuffer("40 03 00 00 "
-                + "02 20 00 0A "
-                + "AA BB "), null);
+        LispAddressSerializer.getInstance().deserializeEid(hexToByteBuffer("""
+            40 03 00 00 \
+            02 20 00 0A \
+            AA BB \
+            """), null);
     }
 
     @Test(expected = LispSerializationException.class)
     public void deserialize__UnknownLCAFType() throws Exception {
-        LispAddressSerializer.getInstance().deserializeEid(hexToByteBuffer("40 03 00 00 "
-                + "AA 20 00 0A " // Type AA is unknown
-                + "00 01 11 22 33 44 " // AFI=1, IP=0x11223344
-                + "00 01 22 33 44 55"), null); // AFI=1, IP=0x22334455
+        LispAddressSerializer.getInstance().deserializeEid(hexToByteBuffer("""
+            40 03 00 00 \
+            AA 20 00 0A \
+            00 01 11 22 33 44 \
+            00 01 22 33 44 55"""), null); // AFI=1, IP=0x22334455
     }
 
     @Test
@@ -76,7 +79,7 @@ public class KeyValueAddressSerializerTest extends BaseTestCase {
         addressBuilder.setValue(new SimpleAddress(new IpAddress(new Ipv4Address("34.51.68.85"))));
 
         EidBuilder eb = new EidBuilder();
-        eb.setAddressType(KeyValueAddressLcaf.class);
+        eb.setAddressType(KeyValueAddressLcaf.VALUE);
         eb.setVirtualNetworkId(null);
         eb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
             .lisp.address.address.KeyValueAddressBuilder()
@@ -89,6 +92,6 @@ public class KeyValueAddressSerializerTest extends BaseTestCase {
                 + "0F 00 00 0C "
                 + "00 01 11 22 33 44 "  // AFI=1, IP=0x11223344
                 + "00 01 22 33 44 55"); // AFI=1, IP=0x22334455
-        ArrayAssert.assertEquals(expectedBuf.array(), buf.array());
+        assertArrayEquals(expectedBuf.array(), buf.array());
     }
 }