Remove use of junit-addons
[lispflowmapping.git] / mappingservice / lisp-proto / src / test / java / org / opendaylight / lispflowmapping / serializer / address / InstanceIdSerializerTest.java
index cbcb1bb85089d141b138ad16efba7b0e7a781cf3..f910a38ae7839dabf51a4a3d785d390a520a0383 100644 (file)
@@ -11,7 +11,6 @@ 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.address.LispAddressSerializerContext;
@@ -33,7 +32,7 @@ public class InstanceIdSerializerTest extends BaseTestCase {
                 + "00 01 11 22 33 44"), // AFI=1, IP=0x11223344
                 new LispAddressSerializerContext(null));
 
-        assertEquals(Ipv4BinaryAfi.class, address.getAddressType());
+        assertEquals(Ipv4BinaryAfi.VALUE, address.getAddressType());
         Ipv4Binary ipv4 = (Ipv4Binary) address.getAddress();
 
         assertArrayEquals(new byte[] {0x11, 0x22, 0x33, 0x44}, ipv4.getIpv4Binary().getValue());
@@ -42,28 +41,31 @@ public class InstanceIdSerializerTest 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 "),
-                new LispAddressSerializerContext(null));
+        LispAddressSerializer.getInstance().deserializeEid(hexToByteBuffer("""
+            40 03 00 00 \
+            02 20 00 0A \
+            AA BB \
+            """), new LispAddressSerializerContext(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 BB CC DD " // instance ID
-                + "00 01 11 22 33 44"), // AFI=1, IP=0x11223344
-                new LispAddressSerializerContext(null));
+        LispAddressSerializer.getInstance().deserializeEid(hexToByteBuffer("""
+            40 03 00 00 \
+            AA 20 00 0A \
+            00 BB CC DD \
+            00 01 11 22 33 44"""), // AFI=1, IP=0x11223344
+            new LispAddressSerializerContext(null));
     }
 
     @Test(expected = LispSerializationException.class)
     public void deserialize__LongInstanceID() throws Exception {
-        LispAddressSerializer.getInstance().deserializeEid(hexToByteBuffer("40 03 00 00 "
-                + "02 20 00 0A " // Type AA is unknown
-                + "AA BB CC DD " // instance ID
-                + "00 01 11 22 33 44"), // AFI=1, IP=0x11223344
-                new LispAddressSerializerContext(null));
+        LispAddressSerializer.getInstance().deserializeEid(hexToByteBuffer("""
+            40 03 00 00 \
+            02 20 00 0A \
+            AA BB CC DD \
+            00 01 11 22 33 44"""), // AFI=1, IP=0x11223344
+            new LispAddressSerializerContext(null));
     }
 
     @Test
@@ -93,6 +95,6 @@ public class InstanceIdSerializerTest extends BaseTestCase {
                 + "02 20 00 0A "
                 + "00 02 03 04 " // instance ID
                 + "00 01 11 22 33 44");
-        ArrayAssert.assertEquals(expectedBuf.array(), buf.array());
+        assertArrayEquals(expectedBuf.array(), buf.array());
     }
 }