Remove use of junit-addons 13/104113/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 24 Jan 2023 16:12:00 +0000 (17:12 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 24 Jan 2023 16:12:00 +0000 (17:12 +0100)
We have a very modern JUnit by default, which includes the assertions we
are using from junitx.framework. Migrate them to normal org.junit.Assert
methods and remove the dependency.

Change-Id: I8d951dbb6bf8f95b8853b1e0a882fd2f46d90b60
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 files changed:
commons/parent/pom.xml
mappingservice/dsbackend/pom.xml
mappingservice/implementation/pom.xml
mappingservice/lisp-proto/pom.xml
mappingservice/lisp-proto/src/test/java/org/opendaylight/lispflowmapping/lisp/authentication/LispAuthenticationTest.java
mappingservice/lisp-proto/src/test/java/org/opendaylight/lispflowmapping/serializer/MapNotifySerializationTest.java
mappingservice/lisp-proto/src/test/java/org/opendaylight/lispflowmapping/serializer/MapRegisterSerializationTest.java
mappingservice/lisp-proto/src/test/java/org/opendaylight/lispflowmapping/serializer/MapReplySerializationTest.java
mappingservice/lisp-proto/src/test/java/org/opendaylight/lispflowmapping/serializer/address/AfiListSerializerTest.java
mappingservice/lisp-proto/src/test/java/org/opendaylight/lispflowmapping/serializer/address/ApplicationDataSerializerTest.java
mappingservice/lisp-proto/src/test/java/org/opendaylight/lispflowmapping/serializer/address/DistinguishedNameSerializerTest.java
mappingservice/lisp-proto/src/test/java/org/opendaylight/lispflowmapping/serializer/address/ExplicitLocatorPathSerializerTest.java
mappingservice/lisp-proto/src/test/java/org/opendaylight/lispflowmapping/serializer/address/InstanceIdSerializerTest.java
mappingservice/lisp-proto/src/test/java/org/opendaylight/lispflowmapping/serializer/address/KeyValueAddressSerializerTest.java
mappingservice/lisp-proto/src/test/java/org/opendaylight/lispflowmapping/serializer/address/ServicePathTest.java
mappingservice/lisp-proto/src/test/java/org/opendaylight/lispflowmapping/serializer/address/SourceDestKeySerializerTest.java
mappingservice/pom.xml
mappingservice/southbound/pom.xml
mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/lisp/LispSouthboundHandlerTest.java

index 2db66078ffe32100631ab1179107669f209e2543..5da396f04e359fd337722c2ef0ed075ce6352a89 100644 (file)
         <type>pom</type>
         <scope>import</scope>
       </dependency>
-      <dependency>
-        <groupId>junit-addons</groupId>
-        <artifactId>junit-addons</artifactId>
-        <version>1.4</version>
-      </dependency>
       <dependency>
         <groupId>org.jmock</groupId>
         <artifactId>jmock</artifactId>
index 025442ab179d4ae5dde02fae0df7615e3a4a01a9..78a424179b77c524140a19bdc377ce75e0bb87b3 100644 (file)
       <artifactId>jakarta.xml.bind-api</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>junit-addons</groupId>
-      <artifactId>junit-addons</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
index 3d19ecad48ddad78a7198fc58011b0bb4204b069..71721286df82679ac01a77d8b747e86997c1afc6 100644 (file)
       <groupId>${project.groupId}</groupId>
       <artifactId>common.unittest.tools</artifactId>
     </dependency>
-    <dependency>
-      <groupId>junit-addons</groupId>
-      <artifactId>junit-addons</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
index 6b61fe95db1810d8488fa6a96dde68591c2fe431..b0d8e2a26afac78760c4448f3108001e010d45a3 100644 (file)
@@ -48,11 +48,5 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <version>${project.version}</version>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>junit-addons</groupId>
-      <artifactId>junit-addons</artifactId>
-      <version>1.4</version>
-      <scope>test</scope>
-    </dependency>
   </dependencies>
 </project>
index 0cdbd2fa771e7a2dc9d3c726e5a2c0c1dfbbf83a..7daabcc7bee3f659bd1ec9532bc7befdefeae13f 100644 (file)
@@ -7,12 +7,12 @@
  */
 package org.opendaylight.lispflowmapping.lisp.authentication;
 
+import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
-import junitx.framework.ArrayAssert;
 import org.junit.Test;
 import org.opendaylight.lispflowmapping.lisp.serializer.MapNotifySerializer;
 import org.opendaylight.lispflowmapping.lisp.serializer.MapRegisterSerializer;
@@ -187,13 +187,13 @@ public class LispAuthenticationTest extends BaseTestCase {
                 new MappingRecordItemBuilder().setMappingRecord(etlrBuilder.build()).setMappingRecordItemId("xyzzy")
                     .build());
         final ByteBuffer serializedMapNotifyMsg = MapNotifySerializer.getInstance().serialize(mapNotifyBuilder.build());
-        ArrayAssert.assertEquals(new byte[0], LispAuthenticationUtil.createAuthenticationData(serializedMapNotifyMsg,
+        assertArrayEquals(new byte[0], LispAuthenticationUtil.createAuthenticationData(serializedMapNotifyMsg,
                 "password"));
 
     }
 
-    private static boolean validate(MapRegister mapRegister, ByteBuffer byteBuffer, Eid eid, Uint16 keyId, String
-            password) {
+    private static boolean validate(final MapRegister mapRegister, final ByteBuffer byteBuffer, final Eid eid,
+            final Uint16 keyId, final String password) {
         MappingAuthkey key = new MappingAuthkeyBuilder().setKeyType(keyId).setKeyString(password).build();
         return LispAuthenticationUtil.validate(mapRegister,byteBuffer, eid, key);
     }
index eb20c9e56a3fd75932aed479cb44ea3c3c07a6f9..33e62c02330e55b6d2f8b00491b057f3acc94346 100644 (file)
@@ -7,13 +7,13 @@
  */
 package org.opendaylight.lispflowmapping.serializer;
 
+import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
-import junitx.framework.ArrayAssert;
 import org.junit.Test;
 import org.opendaylight.lispflowmapping.lisp.serializer.MapNotifySerializer;
 import org.opendaylight.lispflowmapping.lisp.serializer.exception.LispSerializationException;
@@ -61,7 +61,7 @@ public class MapNotifySerializationTest extends BaseTestCase {
 
         byte[] actualAuthenticationData = new byte[20];
         bb.get(actualAuthenticationData);
-        ArrayAssert.assertEquals(authenticationData, actualAuthenticationData);
+        assertArrayEquals(authenticationData, actualAuthenticationData);
 
         bb.position(bb.position() + 12); /* EID in first record */
         assertEquals(0x1, bb.getInt());
@@ -93,7 +93,7 @@ public class MapNotifySerializationTest extends BaseTestCase {
         mnBuilder.setAuthenticationData(authenticationData);
 
         MapNotify mn = mnBuilder.build();
-        ArrayAssert.assertEquals(MapNotifySerializer.getInstance().serialize(mn).array(),
+        assertArrayEquals(MapNotifySerializer.getInstance().serialize(mn).array(),
                 MapNotifySerializer.getInstance().serialize(MapNotifySerializer.getInstance()
                         .deserialize(MapNotifySerializer.getInstance().serialize(mn))).array());
 
@@ -127,7 +127,7 @@ public class MapNotifySerializationTest extends BaseTestCase {
         assertEquals(0xFFBB000000000000L, mn.getNonce().longValue());
         assertEquals(0x0000, mn.getKeyId().shortValue());
         byte[] expectedAuthenticationData = {};
-        ArrayAssert.assertEquals(expectedAuthenticationData, mn.getAuthenticationData());
+        assertArrayEquals(expectedAuthenticationData, mn.getAuthenticationData());
     }
 
     @Test
@@ -396,7 +396,7 @@ public class MapNotifySerializationTest extends BaseTestCase {
         byte[] expectedAuthenticationData = { (byte) 0x2c, (byte) 0x61, (byte) 0xb9, (byte) 0xc9, (byte) 0x9a,
             (byte) 0x20, (byte) 0xba, (byte) 0xd8, (byte) 0xf5, (byte) 0x40, (byte) 0xd3, (byte) 0x55, (byte) 0x6f,
             (byte) 0x5f, (byte) 0x6e, (byte) 0x5a, (byte) 0xb2, (byte) 0x0a, (byte) 0xbf, (byte) 0xb5 };
-        ArrayAssert.assertEquals(expectedAuthenticationData, mn.getAuthenticationData());
+        assertArrayEquals(expectedAuthenticationData, mn.getAuthenticationData());
     }
 
     @Test
@@ -429,6 +429,6 @@ public class MapNotifySerializationTest extends BaseTestCase {
             (byte) 0x8c, (byte) 0x57, (byte) 0x6d, (byte) 0x68, (byte) 0xa5, (byte) 0xbf, (byte) 0x32, (byte) 0x11,
             (byte) 0xc9, (byte) 0x7b, (byte) 0x58, (byte) 0xc4, (byte) 0xb9, (byte) 0x9f, (byte) 0x06, (byte) 0x11,
             (byte) 0x23, (byte) 0xb9, (byte) 0x38 };
-        ArrayAssert.assertEquals(expectedAuthenticationData, mn.getAuthenticationData());
+        assertArrayEquals(expectedAuthenticationData, mn.getAuthenticationData());
     }
 }
index 8d5b118b3afb12f8946b2fea48cb1f9674386714..bce35e483e939900562ab30ef56551598b7dd4f0 100644 (file)
@@ -7,13 +7,13 @@
  */
 package org.opendaylight.lispflowmapping.serializer;
 
+import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
-import junitx.framework.ArrayAssert;
 import org.junit.Test;
 import org.opendaylight.lispflowmapping.lisp.serializer.MapRegisterSerializer;
 import org.opendaylight.lispflowmapping.lisp.serializer.MapRegisterSerializer.Length;
@@ -77,7 +77,7 @@ public class MapRegisterSerializationTest extends BaseTestCase {
 
         byte[] actualAuthenticationData = new byte[20];
         bb.get(actualAuthenticationData);
-        ArrayAssert.assertEquals(authenticationData, actualAuthenticationData);
+        assertArrayEquals(authenticationData, actualAuthenticationData);
 
         bb.position(bb.position() + 12); // EID in first record
         assertEquals(0x1, bb.getInt());
@@ -87,11 +87,11 @@ public class MapRegisterSerializationTest extends BaseTestCase {
 
         byte[] actualXtrId  = new byte[Length.XTRID_SIZE];
         bb.get(actualXtrId);
-        ArrayAssert.assertEquals(xtrId.getValue(), actualXtrId);
+        assertArrayEquals(xtrId.getValue(), actualXtrId);
 
         byte[] actualSiteId = new byte[Length.SITEID_SIZE];
         bb.get(actualSiteId);
-        ArrayAssert.assertEquals(siteId.getValue(), actualSiteId);
+        assertArrayEquals(siteId.getValue(), actualSiteId);
 
         assertEquals(bb.position(), bb.capacity());
     }
@@ -125,8 +125,7 @@ public class MapRegisterSerializationTest extends BaseTestCase {
         mrBuilder.setAuthenticationData(authenticationData);
 
         MapRegister mapRegister = mrBuilder.build();
-        ArrayAssert.assertEquals(
-                MapRegisterSerializer.getInstance().serialize(mapRegister).array(),
+        assertArrayEquals(MapRegisterSerializer.getInstance().serialize(mapRegister).array(),
                 MapRegisterSerializer.getInstance()
                         .serialize(MapRegisterSerializer.getInstance().deserialize(MapRegisterSerializer.getInstance()
                                 .serialize(mapRegister), null)).array());
@@ -212,7 +211,7 @@ public class MapRegisterSerializationTest extends BaseTestCase {
         assertEquals(0xFFBB000000000000L, mr.getNonce().longValue());
         assertEquals(0x0000, mr.getKeyId().shortValue());
         byte[] expectedAuthenticationData = {};
-        ArrayAssert.assertEquals(expectedAuthenticationData, mr.getAuthenticationData());
+        assertArrayEquals(expectedAuthenticationData, mr.getAuthenticationData());
     }
 
     @Test
@@ -228,7 +227,7 @@ public class MapRegisterSerializationTest extends BaseTestCase {
 
         assertTrue(mr.getXtrSiteIdPresent());
 
-        ArrayAssert.assertEquals(bb.array(), MapRegisterSerializer.getInstance().serialize(mr).array());
+        assertArrayEquals(bb.array(), MapRegisterSerializer.getInstance().serialize(mr).array());
     }
 
     @Test
@@ -451,7 +450,7 @@ public class MapRegisterSerializationTest extends BaseTestCase {
         byte[] expectedAuthenticationData = { (byte) 0x2c, (byte) 0x61, (byte) 0xb9, (byte) 0xc9, (byte) 0x9a,
             (byte) 0x20, (byte) 0xba, (byte) 0xd8, (byte) 0xf5, (byte) 0x40, (byte) 0xd3, (byte) 0x55, (byte) 0x6f,
             (byte) 0x5f, (byte) 0x6e, (byte) 0x5a, (byte) 0xb2, (byte) 0x0a, (byte) 0xbf, (byte) 0xb5 };
-        ArrayAssert.assertEquals(expectedAuthenticationData, mr.getAuthenticationData());
+        assertArrayEquals(expectedAuthenticationData, mr.getAuthenticationData());
     }
 
     @Test
@@ -487,6 +486,6 @@ public class MapRegisterSerializationTest extends BaseTestCase {
             (byte) 0x8c, (byte) 0x57, (byte) 0x6d, (byte) 0x68, (byte) 0xa5, (byte) 0xbf, (byte) 0x32, (byte) 0x11,
             (byte) 0xc9, (byte) 0x7b, (byte) 0x58, (byte) 0xc4, (byte) 0xb9, (byte) 0x9f, (byte) 0x06, (byte) 0x11,
             (byte) 0x23, (byte) 0xb9, (byte) 0x38 };
-        ArrayAssert.assertEquals(expectedAuthenticationData, mr.getAuthenticationData());
+        assertArrayEquals(expectedAuthenticationData, mr.getAuthenticationData());
     }
 }
index d0a2bfc6474b1d10e8b4a343f3fd68862fce1d27..74799536a6f2e9873208b2f7108fd61656dfb713 100644 (file)
@@ -12,7 +12,6 @@ import static org.junit.Assert.assertEquals;
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
-import junitx.framework.ArrayAssert;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.opendaylight.lispflowmapping.lisp.serializer.MapReplySerializer;
@@ -162,7 +161,7 @@ public class MapReplySerializationTest extends BaseTestCase {
             0x08 };
         byte[] actual = new byte[16];
         packet.get(actual);
-        ArrayAssert.assertEquals(expected, actual);
+        assertArrayEquals(expected, actual);
 
         packet.position(packet.position() + 12); // EID in second record
         assertEquals(0x08020405, packet.getInt());
index 677a8f1439833abbc137287652ec3ad51261f5d6..ef37d3866972e38c3257a2002dbb6fd4db983cf5 100644 (file)
@@ -7,14 +7,14 @@
  */
 package org.opendaylight.lispflowmapping.serializer.address;
 
+import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
 
 import com.google.common.collect.ImmutableSet;
 import java.nio.ByteBuffer;
 import java.util.Iterator;
 import java.util.Set;
-import junitx.framework.ArrayAssert;
-import junitx.framework.Assert;
 import org.junit.Test;
 import org.opendaylight.lispflowmapping.lisp.serializer.address.LispAddressSerializer;
 import org.opendaylight.lispflowmapping.lisp.serializer.exception.LispSerializationException;
@@ -93,7 +93,7 @@ public class AfiListSerializerTest extends BaseTestCase {
                 + "01 00 00 18 "
                 + "00 01 AA BB CC DD " // IPv4
                 + "00 02 11 22 33 44 11 22 33 44 11 22 33 44 11 22 33 44");
-        ArrayAssert.assertEquals(expectedBuf.array(), buf.array());
+        assertArrayEquals(expectedBuf.array(), buf.array());
     }
 
     @Test
@@ -112,7 +112,7 @@ public class AfiListSerializerTest extends BaseTestCase {
         LispAddressSerializer.getInstance().serialize(buf, rb.build());
         ByteBuffer expectedBuf = hexToByteBuffer("40 03 00 00 "
                 + "01 00 00 00");
-        ArrayAssert.assertEquals(expectedBuf.array(), buf.array());
+        assertArrayEquals(expectedBuf.array(), buf.array());
     }
 
     @Test
@@ -132,7 +132,7 @@ public class AfiListSerializerTest extends BaseTestCase {
                 .lisp.address.address.afi.list.AfiList address3 = listBuilder.build();
 
         assertEquals(address1, address2);
-        Assert.assertNotEquals(address2, address3);
-        Assert.assertNotEquals(address1, address3);
+        assertNotEquals(address2, address3);
+        assertNotEquals(address1, address3);
     }
 }
index c34e5aa96e3f44e10aa85b19da884534dbf2d9c6..c22ff7a32172c1efad62426f5ca0f089cfd1a88c 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;
@@ -113,6 +113,6 @@ public class ApplicationDataSerializerTest extends BaseTestCase {
                 + "A6 A1 A6 A2 " // local port range
                 + "FF DD FF DE " // remote port range
                 + "00 01 11 22 33 44"); // AFI=1, IP=0x11223344
-        ArrayAssert.assertEquals(expectedBuf.array(), buf.array());
+        assertArrayEquals(expectedBuf.array(), buf.array());
     }
 }
index 351093a3c726875d3f4cae78be62b55b234f837a..d8bb2dec72c67e32f12aa64101b5aec181e52f2d 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;
@@ -94,6 +94,6 @@ public class DistinguishedNameSerializerTest extends BaseTestCase {
         ByteBuffer buf = ByteBuffer.allocate(LispAddressSerializer.getInstance().getAddressSize(eb.build()));
         LispAddressSerializer.getInstance().serialize(buf, eb.build());
         ByteBuffer expectedBuf = hexToByteBuffer("00 11 64 61 76 69 64 00");
-        ArrayAssert.assertEquals(expectedBuf.array(), buf.array());
+        assertArrayEquals(expectedBuf.array(), buf.array());
     }
 }
index fc6f2cbb22683b135d637ca299e7c76af644ab6f..0727c41e9a4b2fd80684fb386718fcee459cc932 100644 (file)
@@ -7,12 +7,12 @@
  */
 package org.opendaylight.lispflowmapping.serializer.address;
 
+import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.List;
-import junitx.framework.ArrayAssert;
 import org.junit.Test;
 import org.opendaylight.lispflowmapping.lisp.serializer.address.LispAddressSerializer;
 import org.opendaylight.lispflowmapping.lisp.serializer.exception.LispSerializationException;
@@ -119,7 +119,7 @@ public class ExplicitLocatorPathSerializerTest extends BaseTestCase {
                 + "0A 00 00 10 "
                 + "00 00 00 01 AA BB CC DD "  // IPv4
                 + "00 00 00 01 11 22 33 44"); // IPv4
-        ArrayAssert.assertEquals(expectedBuf.array(), buf.array());
+        assertArrayEquals(expectedBuf.array(), buf.array());
     }
 
     @Test
@@ -134,6 +134,6 @@ public class ExplicitLocatorPathSerializerTest extends BaseTestCase {
         LispAddressSerializer.getInstance().serialize(buf, rb.build());
         ByteBuffer expectedBuf = hexToByteBuffer("40 03 00 00 "
                 + "0A 00 00 00");
-        ArrayAssert.assertEquals(expectedBuf.array(), buf.array());
+        assertArrayEquals(expectedBuf.array(), buf.array());
     }
 }
index dfaaa5cee200e1e35416dadd3f3c52fa96dd1fc9..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;
@@ -96,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());
     }
 }
index 05e16ce79ec011b0de5d5e29382b6398d8daaf84..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;
@@ -92,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());
     }
 }
index c10e334cf25938c738f73a707b10e65fd1233aef..6b7ee18172093ca04c620790199e807fff050dc4 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.address.LispAddressSerializerContext;
@@ -51,6 +51,6 @@ public class ServicePathTest extends BaseTestCase {
         ByteBuffer expectedBuf = hexToByteBuffer("40 03 00 00 "
                 + "11 00 00 04 "
                 + "00 00 01 FF");
-        ArrayAssert.assertEquals(expectedBuf.array(), buf.array());
+        assertArrayEquals(expectedBuf.array(), buf.array());
     }
 }
index 564bcc8ae1efdb523acaf900d66d19ce6a6457e9..7564dab457873cbdbfaa995af701970c53f3d3ac 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.address.LispAddressSerializerContext;
@@ -104,6 +104,6 @@ public class SourceDestKeySerializerTest extends BaseTestCase {
                 + "00 00 08 10 " // reserved + masks
                 + "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());
     }
 }
index 94d9d24a61f0ff0de61c0af125c4bbc945be36de..59304232530c96365f419f6beedff5e7c15fbce9 100644 (file)
         <version>${project.version}</version>
         <scope>test</scope>
       </dependency>
-      <dependency>
-        <groupId>junit-addons</groupId>
-        <artifactId>junit-addons</artifactId>
-        <version>1.4</version>
-        <scope>test</scope>
-      </dependency>
     </dependencies>
   </dependencyManagement>
 
index 6edf0cd675f6df2427dc219532e903a74c900196..fad93c529f50c6dd7145b45047ccdad8984af9da 100644 (file)
       <artifactId>netty-transport-native-epoll</artifactId>
       <classifier>linux-x86_64</classifier>
     </dependency>
-    <dependency>
-      <groupId>junit-addons</groupId>
-      <artifactId>junit-addons</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.opendaylight.lispflowmapping</groupId>
       <artifactId>common.unittest.tools</artifactId>
index 641acb874f8809622e3ea736c98f423edeac9294..9c66d731211ea78e101e3e0691c12c967b3a4455 100644 (file)
@@ -9,6 +9,7 @@
 package org.opendaylight.lispflowmapping.southbound.lisp;
 
 import static io.netty.buffer.Unpooled.wrappedBuffer;
+import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -29,7 +30,6 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
-import junitx.framework.ArrayAssert;
 import org.apache.commons.lang3.ArrayUtils;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -704,8 +704,7 @@ public class LispSouthboundHandlerTest extends BaseTestCase {
                 Arrays.copyOfRange(mapRegisterPacket, 36, mapRegisterPacket.length));
         byte[] notifyWithoutTypeWithOutAuthenticationData = ArrayUtils.addAll(Arrays.copyOfRange(result, 3, 16),
                 Arrays.copyOfRange(result, 36, result.length));
-        ArrayAssert.assertEquals(registerWithoutTypeWithoutAuthenticationData,
-                notifyWithoutTypeWithOutAuthenticationData);
+        assertArrayEquals(registerWithoutTypeWithoutAuthenticationData, notifyWithoutTypeWithOutAuthenticationData);
     }
 
     @Ignore
@@ -859,7 +858,7 @@ public class LispSouthboundHandlerTest extends BaseTestCase {
         assertEquals(AddressFamily.IpV6.getIntValue(), ByteUtil.getInt(result, MapReplyIpv4SingleLocatorPos.AFI_TYPE));
         byte[] expectedIpv6 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 };
 
-        ArrayAssert.assertEquals(expectedIpv6, Arrays.copyOfRange(result, 24, 40));
+        assertArrayEquals(expectedIpv6, Arrays.copyOfRange(result, 24, 40));
     }
 
     @Test
@@ -876,10 +875,10 @@ public class LispSouthboundHandlerTest extends BaseTestCase {
         assertEquals(64, result.length);
 
         byte[] expectedIpv6Eid = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 };
-        ArrayAssert.assertEquals(expectedIpv6Eid, Arrays.copyOfRange(result, 24, 40));
+        assertArrayEquals(expectedIpv6Eid, Arrays.copyOfRange(result, 24, 40));
 
         byte[] expectedIpv6Rloc = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 };
-        ArrayAssert.assertEquals(expectedIpv6Rloc, Arrays.copyOfRange(result, 48, 64));
+        assertArrayEquals(expectedIpv6Rloc, Arrays.copyOfRange(result, 48, 64));
     }
 
     @Ignore
@@ -944,7 +943,7 @@ public class LispSouthboundHandlerTest extends BaseTestCase {
         assertEquals(AddressFamily.IpV6.getIntValue(), ByteUtil.getInt(result, MapReplyIpv4SecondLocatorPos.LOC_AFI));
 
         byte[] expectedIpv6Rloc = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 };
-        ArrayAssert.assertEquals(expectedIpv6Rloc, Arrays.copyOfRange(result, MapReplyIpv4SecondLocatorPos.LOCATOR,
+        assertArrayEquals(expectedIpv6Rloc, Arrays.copyOfRange(result, MapReplyIpv4SecondLocatorPos.LOCATOR,
                 MapReplyIpv4SecondLocatorPos.LOCATOR + 16));
 
         assertEquals(0x01, result[MapReplyIpv4SecondLocatorPos.LOCATOR_RBIT] & 0x01);