Remove use of junit-addons
[lispflowmapping.git] / mappingservice / lisp-proto / src / test / java / org / opendaylight / lispflowmapping / serializer / MapRegisterSerializationTest.java
index ec990dbd596c88cf0e2c3900c531527bb3848dd2..bce35e483e939900562ab30ef56551598b7dd4f0 100644 (file)
@@ -5,35 +5,31 @@
  * 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.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;
 import org.opendaylight.lispflowmapping.lisp.serializer.exception.LispSerializationException;
 import org.opendaylight.lispflowmapping.lisp.util.LispAddressUtil;
+import org.opendaylight.lispflowmapping.lisp.util.MaskUtil;
 import org.opendaylight.lispflowmapping.tools.junit.BaseTestCase;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.NoAddressAfi;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.Address;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.NoAddressBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MapRegister;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.EidBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.SiteId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.XtrId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.locatorrecords.LocatorRecord;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.container.MappingRecord.Action;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.container.MappingRecord;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.container.MappingRecordBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.list.MappingRecordItem;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.list.MappingRecordItemBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping._record.container.MappingRecord;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping._record.container.MappingRecord.Action;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping._record.container.MappingRecordBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping._record.list.MappingRecordItem;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping._record.list.MappingRecordItemBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapregisternotification.MapRegisterBuilder;
 
 public class MapRegisterSerializationTest extends BaseTestCase {
@@ -47,24 +43,28 @@ public class MapRegisterSerializationTest extends BaseTestCase {
         recordBuilder.setEid(LispAddressUtil.asIpv4PrefixEid("0.0.0.1/32"));
 
         mrBuilder.getMappingRecordItem().add(
-                new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).build());
+                new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).setMappingRecordItemId("xyzzy")
+                    .build());
         recordBuilder.setEid(LispAddressUtil.asIpv4PrefixEid("0.0.0.73/32"));
         mrBuilder.getMappingRecordItem().add(
-                new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).build());
+                new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).setMappingRecordItemId("xyzzy")
+                    .build());
 
         mrBuilder.setNonce(6161616161L);
         mrBuilder.setKeyId((short) 0x0001);
         mrBuilder.setWantMapNotify(true);
         mrBuilder.setProxyMapReply(true);
         mrBuilder.setXtrSiteIdPresent(true);
-        byte[] authenticationData = new byte[] { (byte) 0x16, (byte) 0x98, (byte) 0x96, (byte) 0xeb, (byte) 0x88, (byte) 0x2d, (byte) 0x4d,
-                (byte) 0x22, (byte) 0xe5, (byte) 0x8f, (byte) 0xe6, (byte) 0x89, (byte) 0x64, (byte) 0xb9, (byte) 0x17, (byte) 0xa4, (byte) 0xba,
-                (byte) 0x4e, (byte) 0x8c, (byte) 0x41 };
+        byte[] authenticationData = new byte[] { (byte) 0x16, (byte) 0x98, (byte) 0x96, (byte) 0xeb, (byte) 0x88,
+            (byte) 0x2d, (byte) 0x4d, (byte) 0x22, (byte) 0xe5, (byte) 0x8f, (byte) 0xe6, (byte) 0x89, (byte) 0x64,
+            (byte) 0xb9, (byte) 0x17, (byte) 0xa4, (byte) 0xba, (byte) 0x4e, (byte) 0x8c, (byte) 0x41 };
         mrBuilder.setAuthenticationData(authenticationData);
-        byte[] xtrId  = new byte[] { (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
-                (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x01 };
+        XtrId xtrId  = new XtrId(new byte[] { (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
+            (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
+            (byte) 0x00, (byte) 0x00, (byte) 0x01 });
         mrBuilder.setXtrId(xtrId);
-        byte[] siteId = new byte[] { (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x01 };
+        SiteId siteId = new SiteId(new byte[] { (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
+            (byte) 0x00, (byte) 0x00, (byte) 0x01 });
         mrBuilder.setSiteId(siteId);
 
         ByteBuffer bb = MapRegisterSerializer.getInstance().serialize(mrBuilder.build());
@@ -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, actualXtrId);
+        assertArrayEquals(xtrId.getValue(), actualXtrId);
 
         byte[] actualSiteId = new byte[Length.SITEID_SIZE];
         bb.get(actualSiteId);
-        ArrayAssert.assertEquals(siteId, actualSiteId);
+        assertArrayEquals(siteId.getValue(), actualSiteId);
 
         assertEquals(bb.position(), bb.capacity());
     }
@@ -105,30 +105,30 @@ public class MapRegisterSerializationTest extends BaseTestCase {
         recordBuilder.setEid(LispAddressUtil.asIpv4PrefixEid("0.0.0.1/32"));
 
         mrBuilder.getMappingRecordItem().add(
-                new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).build());
+                new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).setMappingRecordItemId("xyzzy")
+                    .build());
         recordBuilder.setEid(LispAddressUtil.asIpv4PrefixEid("0.0.0.73/32"));
         mrBuilder.getMappingRecordItem().add(
-                new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).build());
+                new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).setMappingRecordItemId("xyzzy")
+                    .build());
 
         recordBuilder.setAction(Action.NoAction);
         recordBuilder.setMapVersion((short) 0);
-        recordBuilder.setMaskLength((short) 0);
         recordBuilder.setRecordTtl(0);
         mrBuilder.setNonce(6161616161L);
         mrBuilder.setKeyId((short) 0x0001);
         mrBuilder.setWantMapNotify(true);
         mrBuilder.setProxyMapReply(true);
-        byte[] authenticationData = new byte[] { (byte) 0x16, (byte) 0x98, (byte) 0x96, (byte) 0xeb, (byte) 0x88, (byte) 0x2d, (byte) 0x4d,
-                (byte) 0x22, (byte) 0xe5, (byte) 0x8f, (byte) 0xe6, (byte) 0x89, (byte) 0x64, (byte) 0xb9, (byte) 0x17, (byte) 0xa4, (byte) 0xba,
-                (byte) 0x4e, (byte) 0x8c, (byte) 0x41 };
+        byte[] authenticationData = new byte[] { (byte) 0x16, (byte) 0x98, (byte) 0x96, (byte) 0xeb, (byte) 0x88,
+            (byte) 0x2d, (byte) 0x4d, (byte) 0x22, (byte) 0xe5, (byte) 0x8f, (byte) 0xe6, (byte) 0x89, (byte) 0x64,
+            (byte) 0xb9, (byte) 0x17, (byte) 0xa4, (byte) 0xba, (byte) 0x4e, (byte) 0x8c, (byte) 0x41 };
         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)))
-                        .array());
+                        .serialize(MapRegisterSerializer.getInstance().deserialize(MapRegisterSerializer.getInstance()
+                                .serialize(mapRegister), null)).array());
     }
 
     @Test
@@ -137,7 +137,9 @@ public class MapRegisterSerializationTest extends BaseTestCase {
         mrBuilder.setMappingRecordItem(new ArrayList<MappingRecordItem>());
         mrBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(
                 new MappingRecordBuilder().setRecordTtl(55)
-                        .setEid(LispAddressUtil.asIpv4PrefixEid("0.0.0.1/32")).build()).build());
+                        .setEid(LispAddressUtil.asIpv4PrefixEid("0.0.0.1/32")).build())
+                        .setMappingRecordItemId("xyzzy")
+                        .build());
         // mrBuilder.addEidToLocator(new EidToLocatorRecord().setPrefix(new
         // LispIpv4Address(1)).setRecordTtl(55));
 
@@ -166,12 +168,12 @@ public class MapRegisterSerializationTest extends BaseTestCase {
         MapRegisterBuilder mrBuilder = new MapRegisterBuilder();
         mrBuilder.setMappingRecordItem(new ArrayList<MappingRecordItem>());
         mrBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(
-                new MappingRecordBuilder().build()).build());
+                new MappingRecordBuilder().build()).setMappingRecordItemId("xyzzy").build());
         mrBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(
-                new MappingRecordBuilder().setEid(null).build()).build());
+                new MappingRecordBuilder().setEid(null).build()).setMappingRecordItemId("xyzzy").build());
         mrBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(
-                new MappingRecordBuilder().setEid(new EidBuilder().setAddressType(NoAddressAfi.class).setAddress(
-                        (Address) new NoAddressBuilder().setNoAddress(true).build()).build()).build()).build());
+                new MappingRecordBuilder().setEid(LispAddressUtil.getNoAddressEid()).build())
+                    .setMappingRecordItemId("xyzzy").build());
 
         ByteBuffer bb = MapRegisterSerializer.getInstance().serialize(mrBuilder.build());
         bb.position(bb.position() + 16); // jump to first record prefix AFI
@@ -200,16 +202,16 @@ public class MapRegisterSerializationTest extends BaseTestCase {
         //
                 + "00 00 00 00 00 00 00 00 00 00 00 00 " //
                 + "00 0a 01 20 10 00 00 00 00 01 99 10 fe 01 01 64 " //
-                + "ff 00 00 05 00 01 c0 a8 88 0a"));
+                + "ff 00 00 05 00 01 c0 a8 88 0a"), null);
 
-        assertTrue(mr.isProxyMapReply());
-        assertTrue(mr.isWantMapNotify());
+        assertTrue(mr.getProxyMapReply());
+        assertTrue(mr.getWantMapNotify());
 
         assertEquals(1, mr.getMappingRecordItem().size());
         assertEquals(0xFFBB000000000000L, mr.getNonce().longValue());
         assertEquals(0x0000, mr.getKeyId().shortValue());
         byte[] expectedAuthenticationData = {};
-        ArrayAssert.assertEquals(expectedAuthenticationData, mr.getAuthenticationData());
+        assertArrayEquals(expectedAuthenticationData, mr.getAuthenticationData());
     }
 
     @Test
@@ -217,15 +219,15 @@ public class MapRegisterSerializationTest extends BaseTestCase {
         ByteBuffer bb = hexToByteBuffer("32 00 01 01 63 99 "
                 + "83 64 23 06 a8 be 00 01 00 14 b8 c2 a2 e1 dc 4a "
                 + "08 0c f6 01 b0 9d 70 5a d4 88 95 f8 73 dd 00 00 "
-                + "05 a0 01 20 10 00 00 00 40 03 00 00 02 00 00 0a "
+                + "05 a0 01 20 10 00 00 00 40 03 00 00 02 20 00 0a "
                 + "00 00 00 01 00 01 c3 a8 c8 01 0a 32 ff 00 00 04 "
                 + "00 01 ac 10 01 02 15 1a 39 80 e3 35 e6 c4 49 a6 "
                 + "90 87 20 65 9a b7 00 00 00 00 00 00 00 00 ");
-        MapRegister mr = MapRegisterSerializer.getInstance().deserialize(bb);
+        MapRegister mr = MapRegisterSerializer.getInstance().deserialize(bb, null);
 
-        assertTrue(mr.isXtrSiteIdPresent());
+        assertTrue(mr.getXtrSiteIdPresent());
 
-        ArrayAssert.assertEquals(bb.array(), MapRegisterSerializer.getInstance().serialize(mr).array());
+        assertArrayEquals(bb.array(), MapRegisterSerializer.getInstance().serialize(mr).array());
     }
 
     @Test
@@ -254,12 +256,12 @@ public class MapRegisterSerializationTest extends BaseTestCase {
                 + "00 00 00 0a 01 20 10 00 00 00 00 01 96 10 fe 01 01 64 " // Record
                 // 4
                 + "ff 00 00 05 00 01 c0 a8 88 0d " // contd
-        ));
+        ), null);
 
         assertEquals(4, mr.getMappingRecordItem().size());
-        assertEquals(LispAddressUtil.asIpv4PrefixEid("153.16.254.1/32"), mr.getMappingRecordItem().get(0)
+        assertEquals(LispAddressUtil.asIpv4PrefixBinaryEid("153.16.254.1/32"), mr.getMappingRecordItem().get(0)
                 .getMappingRecord().getEid());
-        assertEquals(LispAddressUtil.asIpv4PrefixEid("151.16.254.1/32"), mr.getMappingRecordItem().get(2)
+        assertEquals(LispAddressUtil.asIpv4PrefixBinaryEid("151.16.254.1/32"), mr.getMappingRecordItem().get(2)
                 .getMappingRecord().getEid());
         assertEquals(LispAddressUtil.asIpv4Rloc("192.168.136.11"), mr.getMappingRecordItem().get(1)
                 .getMappingRecord().getLocatorRecord().get(0).getRloc());
@@ -288,7 +290,7 @@ public class MapRegisterSerializationTest extends BaseTestCase {
                 + "60 11 34 A4 " // priorities + weights
                 + "00 03 " // Flags
                 + "00 01 c0 a8 88 0a " // Locator
-        ));
+        ), null);
 
         assertEquals(1, mr.getMappingRecordItem().size());
         MappingRecordItem eidToLocator = mr.getMappingRecordItem().get(0);
@@ -312,17 +314,17 @@ public class MapRegisterSerializationTest extends BaseTestCase {
         assertEquals((byte) 0x34, loc1.getMulticastWeight().byteValue());
         assertEquals((byte) 0xA4, loc2.getMulticastWeight().byteValue());
 
-        assertTrue(loc0.isLocalLocator());
-        assertFalse(loc1.isLocalLocator());
-        assertFalse(loc2.isLocalLocator());
+        assertTrue(loc0.getLocalLocator());
+        assertFalse(loc1.getLocalLocator());
+        assertFalse(loc2.getLocalLocator());
 
-        assertFalse(loc0.isRlocProbed());
-        assertTrue(loc1.isRlocProbed());
-        assertTrue(loc2.isRlocProbed());
+        assertFalse(loc0.getRlocProbed());
+        assertTrue(loc1.getRlocProbed());
+        assertTrue(loc2.getRlocProbed());
 
-        assertTrue(loc0.isRouted());
-        assertFalse(loc1.isRouted());
-        assertTrue(loc2.isRouted());
+        assertTrue(loc0.getRouted());
+        assertFalse(loc1.getRouted());
+        assertTrue(loc2.getRouted());
 
         assertEquals(LispAddressUtil.asIpv4Rloc("192.168.136.10"), loc0.getRloc());
         assertEquals(LispAddressUtil.asIpv4Rloc("204.170.170.17"), loc1.getRloc());
@@ -354,30 +356,30 @@ public class MapRegisterSerializationTest extends BaseTestCase {
                 + "00 00 00 0d 01 20 20 00 03 33 00 01 96 10 fe 01 01 64 " // Record
                 // 3
                 + "ff 00 00 05 00 01 c0 a8 88 0d " // contd
-        ));
+        ), null);
 
         assertEquals(4, mr.getMappingRecordItem().size());
 
-        MappingRecord record0 = mr.getMappingRecordItem().get(0).getMappingRecord();
-        MappingRecord record1 = mr.getMappingRecordItem().get(1).getMappingRecord();
-        MappingRecord record2 = mr.getMappingRecordItem().get(2).getMappingRecord();
-        MappingRecord record3 = mr.getMappingRecordItem().get(3).getMappingRecord();
+        final MappingRecord record0 = mr.getMappingRecordItem().get(0).getMappingRecord();
+        final MappingRecord record1 = mr.getMappingRecordItem().get(1).getMappingRecord();
+        final MappingRecord record2 = mr.getMappingRecordItem().get(2).getMappingRecord();
+        final MappingRecord record3 = mr.getMappingRecordItem().get(3).getMappingRecord();
 
         assertEquals(10, record0.getRecordTtl().intValue());
         assertEquals(13, record3.getRecordTtl().intValue());
 
-        assertEquals(32, record0.getMaskLength().intValue());
-        assertEquals(23, record1.getMaskLength().intValue());
+        assertEquals(32, MaskUtil.getMaskForAddress(record0.getEid().getAddress()));
+        assertEquals(23, MaskUtil.getMaskForAddress(record1.getEid().getAddress()));
 
         assertEquals(Action.NoAction, record0.getAction());
         assertEquals(Action.SendMapRequest, record1.getAction());
         assertEquals(Action.NoAction, record2.getAction());
         assertEquals(Action.NativelyForward, record3.getAction());
 
-        assertTrue(record0.isAuthoritative());
-        assertTrue(record1.isAuthoritative());
-        assertFalse(record2.isAuthoritative());
-        assertFalse(record3.isAuthoritative());
+        assertTrue(record0.getAuthoritative());
+        assertTrue(record1.getAuthoritative());
+        assertFalse(record2.getAuthoritative());
+        assertFalse(record3.getAuthoritative());
 
         assertEquals(0x000, record0.getMapVersion().shortValue());
         assertEquals(0x111, record1.getMapVersion().shortValue());
@@ -392,7 +394,7 @@ public class MapRegisterSerializationTest extends BaseTestCase {
                 + "00 00 00 00 00 00 00 01 00 14 ec 47 1e 53 25 91 " //
                 + "2f 68 10 75 13 dd 2c e8 6e 3c ac 94 ed e4 00 00 " //
                 + "00 0a 01 20 F0 00 00 00 00 01 99 10 fe 01 01 64 " //
-                + "ff 00 00 05 00 01 c0 a8 88 0a"));
+                + "ff 00 00 05 00 01 c0 a8 88 0a"), null);
 
         assertEquals(1, mr.getMappingRecordItem().size());
         assertEquals(Action.NoAction, mr.getMappingRecordItem().get(0).getMappingRecord().getAction());
@@ -416,7 +418,7 @@ public class MapRegisterSerializationTest extends BaseTestCase {
                 + "00 00 00 00 00 00 00 00 00 14 e8 f5 0b c5 c5 f2 " //
                 + "b0 21 27 a8 21 a5 68 89 ec 00 00 " //
                 + "00 0a 01 20 10 00 00 00 00 01 99 10 fe 01 01 64 " //
-                + "ff 00 00 05 00 01 c0 a8 88 0a"));
+                + "ff 00 00 05 00 01 c0 a8 88 0a"), null);
     }
 
     @Test
@@ -437,18 +439,18 @@ public class MapRegisterSerializationTest extends BaseTestCase {
                 + "00 00 00 00 00 00 00 01 00 14 2c 61 b9 c9 9a 20 " //
                 + "ba d8 f5 40 d3 55 6f 5f 6e 5a b2 0a bf b5 00 00 " //
                 + "00 0a 01 20 10 00 00 00 00 01 99 10 fe 01 01 64 " //
-                + "ff 00 00 05 00 01 c0 a8 88 0a"));
+                + "ff 00 00 05 00 01 c0 a8 88 0a"), null);
 
-        assertTrue(mr.isProxyMapReply());
-        assertTrue(mr.isWantMapNotify());
+        assertTrue(mr.getProxyMapReply());
+        assertTrue(mr.getWantMapNotify());
 
         assertEquals(1, mr.getMappingRecordItem().size());
         assertEquals(0xFFBB000000000000L, mr.getNonce().longValue());
         assertEquals(0x0001, mr.getKeyId().shortValue());
-        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());
+        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 };
+        assertArrayEquals(expectedAuthenticationData, mr.getAuthenticationData());
     }
 
     @Test
@@ -471,18 +473,19 @@ public class MapRegisterSerializationTest extends BaseTestCase {
                 //
                 + "11 c9 7b 58 c4 b9 9f 06 11 23 b9 38 00 00 " //
                 + "00 0a 01 20 10 00 00 00 00 01 99 10 fe 01 01 64 " //
-                + "ff 00 00 05 00 01 c0 a8 88 0a"));
+                + "ff 00 00 05 00 01 c0 a8 88 0a"), null);
 
-        assertTrue(mr.isProxyMapReply());
-        assertTrue(mr.isWantMapNotify());
+        assertTrue(mr.getProxyMapReply());
+        assertTrue(mr.getWantMapNotify());
 
         assertEquals(1, mr.getMappingRecordItem().size());
         assertEquals(0xFFBB000000000000L, mr.getNonce().longValue());
         assertEquals(0x0002, mr.getKeyId().shortValue());
-        byte[] expectedAuthenticationData = { (byte) 0x70, (byte) 0x30, (byte) 0xd4, (byte) 0xc6, (byte) 0x10, (byte) 0x44, (byte) 0x0d, (byte) 0x83,
-                (byte) 0xbe, (byte) 0x4d, (byte) 0xbf, (byte) 0xfd, (byte) 0xa9, (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());
+        byte[] expectedAuthenticationData = { (byte) 0x70, (byte) 0x30, (byte) 0xd4, (byte) 0xc6, (byte) 0x10,
+            (byte) 0x44, (byte) 0x0d, (byte) 0x83, (byte) 0xbe, (byte) 0x4d, (byte) 0xbf, (byte) 0xfd, (byte) 0xa9,
+            (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 };
+        assertArrayEquals(expectedAuthenticationData, mr.getAuthenticationData());
     }
 }