Checkstyle: enforce 120 character limit 01/36501/1
authorLorand Jakab <lojakab@cisco.com>
Mon, 21 Mar 2016 14:07:57 +0000 (16:07 +0200)
committerLorand Jakab <lojakab@cisco.com>
Mon, 21 Mar 2016 14:25:31 +0000 (16:25 +0200)
We spend too much time on this character limit in reviews. Fix existing
violations and enforce the limit at build time in the future to avoid
this.

Not all fixed violations resulted in beautifully readable code, but this
is a first step, to get the enforcement off the ground, things can be
then improved gradually, as we work on the code in question.

Change-Id: I0d4a9aeca0e7a8f9f9927581211b40d13bcd9661
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
39 files changed:
commons/build_tools/src/main/resources/checkstyle/java_rules.xml
integrationtest/src/test/java/org/opendaylight/lispflowmapping/integrationtest/MappingServiceIntegrationTest.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/LispMappingService.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/authentication/LispAuthenticationFactory.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/authentication/LispAuthenticationUtil.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/authentication/LispMACAuthentication.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/lisp/MapResolver.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/MappingDataListener.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/util/InstanceIdentifierUtil.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/util/LispNotificationHelper.java
mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/authentication/LispAuthenticationTest.java
mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/lisp/MapResolverTest.java
mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/lisp/MapServerTest.java
mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/lisp/MappingServiceTest.java
mappingservice/lisp-proto/src/main/java/org/opendaylight/lispflowmapping/lisp/serializer/LocatorRecordSerializer.java
mappingservice/lisp-proto/src/main/java/org/opendaylight/lispflowmapping/lisp/serializer/MapNotifySerializer.java
mappingservice/lisp-proto/src/main/java/org/opendaylight/lispflowmapping/lisp/serializer/MapRegisterSerializer.java
mappingservice/lisp-proto/src/main/java/org/opendaylight/lispflowmapping/lisp/serializer/MapRequestSerializer.java
mappingservice/lisp-proto/src/main/java/org/opendaylight/lispflowmapping/lisp/serializer/address/AfiListSerializer.java
mappingservice/lisp-proto/src/main/java/org/opendaylight/lispflowmapping/lisp/serializer/address/ApplicationDataSerializer.java
mappingservice/lisp-proto/src/main/java/org/opendaylight/lispflowmapping/lisp/serializer/address/ExplicitLocatorPathSerializer.java
mappingservice/lisp-proto/src/main/java/org/opendaylight/lispflowmapping/lisp/serializer/address/KeyValueAddressSerializer.java
mappingservice/lisp-proto/src/main/java/org/opendaylight/lispflowmapping/lisp/serializer/address/ServicePathSerializer.java
mappingservice/lisp-proto/src/main/java/org/opendaylight/lispflowmapping/lisp/serializer/address/SourceDestKeySerializer.java
mappingservice/lisp-proto/src/main/java/org/opendaylight/lispflowmapping/lisp/util/LispAddressUtil.java
mappingservice/lisp-proto/src/test/java/org/opendaylight/lispflowmapping/lisp/util/LispAddressUtilTest.java
mappingservice/lisp-proto/src/test/java/org/opendaylight/lispflowmapping/serializer/MapNotifySerializationTest.java
mappingservice/lisp-proto/src/test/java/org/opendaylight/lispflowmapping/serializer/MapReplySerializationTest.java
mappingservice/lisp-proto/src/test/java/org/opendaylight/lispflowmapping/serializer/MapRequestSerializationTest.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/ExplicitLocatorPathSerializerTest.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/SourceDestKeySerializerTest.java
mappingservice/neutron/src/main/java/org/opendaylight/lispflowmapping/neutron/LispNeutronPortHandler.java
mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundRPC.java
mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/lisp/LispSouthboundHandler.java
mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/lisp/LispXtrSouthboundHandler.java
mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/lisp/LispSouthboundServiceTest.java

index 7054836723fc231c12038c49ac8a9de277ba4fc3..60ac9a3a966496d60ea5e8568149cc1502533930 100644 (file)
     </module>
 
     <module name="TreeWalker">
-       <module name="RedundantImport"/>
-       <module name="UnusedImports"/>
-       <module name="AvoidStarImport"/>
-       <module name="NeedBraces"/>
-       <module name="UpperEll"/>
-       <module name="EmptyStatement"/>
-       <module name="EqualsHashCode"/>
+        <module name="LineLength">
+            <property name="max" value="120"/>
+            <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
+        </module>
+        <module name="RedundantImport"/>
+        <module name="UnusedImports"/>
+        <module name="AvoidStarImport"/>
+        <module name="NeedBraces"/>
+        <module name="UpperEll"/>
+        <module name="EmptyStatement"/>
+        <module name="EqualsHashCode"/>
     </module>
 
 </module>
index 74766ba36613b943412e8745311cda85bf88fdf4..9696ba37cd9c5b69257bf0b61d4859d5359db5e0 100644 (file)
@@ -244,7 +244,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         // 255/0
         //
 
-        mapRegisterPacketWithAuthenticationAndMapNotify = extractWSUdpByteArray(new String("0000   00 50 56 ee d1 4f 00 0c 29 7a ce 79 08 00 45 00 " //
+        mapRegisterPacketWithAuthenticationAndMapNotify = extractWSUdpByteArray(new String(
+                  "0000   00 50 56 ee d1 4f 00 0c 29 7a ce 79 08 00 45 00 " //
                 + "0010   00 5c 00 00 40 00 40 11 d4 db c0 a8 88 0a 80 df "
                 + "0020   9c 23 d6 40 10 f6 00 48 59 a4 38 00 01 01 00 00 "
                 + "0030   00 00 00 00 00 00 00 01 00 14 0e a4 c6 d8 a4 06 "
@@ -266,7 +267,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         // 255/0
         //
 
-        mapRegisterPacketWithNotify = extractWSUdpByteArray(new String("0000   00 50 56 ee d1 4f 00 0c 29 7a ce 79 08 00 45 00 " //
+        mapRegisterPacketWithNotify = extractWSUdpByteArray(new String(
+                  "0000   00 50 56 ee d1 4f 00 0c 29 7a ce 79 08 00 45 00 " //
                 + "0010   00 5c 00 00 40 00 40 11 d4 db c0 a8 88 0a 80 df "
                 + "0020   9c 23 d6 40 10 f6 00 48 59 a4 38 00 01 01 00 00 "
                 + "0030   00 00 00 00 00 07 00 00 00 14 0e a4 c6 d8 a4 06 "
@@ -288,7 +290,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         // 255/0
         //
 
-        mapRegisterPacketWithoutNotify = extractWSUdpByteArray(new String("0000   00 50 56 ee d1 4f 00 0c 29 7a ce 79 08 00 45 00 " //
+        mapRegisterPacketWithoutNotify = extractWSUdpByteArray(new String(
+                  "0000   00 50 56 ee d1 4f 00 0c 29 7a ce 79 08 00 45 00 " //
                 + "0010   00 5c 00 00 40 00 40 11 d4 db c0 a8 88 0a 80 df "
                 + "0020   9c 23 d6 40 10 f6 00 48 59 a4 38 00 00 01 00 00 "
                 + "0030   00 00 00 00 00 07 00 00 00 14 0e a4 c6 d8 a4 06 "
@@ -525,8 +528,10 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         Rloc rloc2Value = LispAddressUtil.asIpv4Rloc("4.3.2.2");
         MapReply mapReply = sendMapRegisterTwiceWithDiffrentValues(eid, rloc1Value, rloc2Value);
         assertEquals(1, mapReply.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().size());
-        Rloc rloc1ReturnValueContainer = mapReply.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0).getRloc();
-        Rloc rloc2ReturnValueContainer = mapReply.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(1).getRloc();
+        Rloc rloc1ReturnValueContainer = mapReply.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord()
+                .get(0).getRloc();
+        Rloc rloc2ReturnValueContainer = mapReply.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord()
+                .get(1).getRloc();
         assertTrue((rloc1Value.equals(rloc1ReturnValueContainer) && rloc2Value.equals(rloc2ReturnValueContainer))
                 || (rloc1Value.equals(rloc2ReturnValueContainer) && rloc2Value.equals(rloc1ReturnValueContainer)));
     }
@@ -539,8 +544,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         MapNotify mapNotify = lms.handleMapRegister(mb).getLeft();
         MapRequest mr = createMapRequest(eid);
         MapReply mapReply = lms.handleMapRequest(mr);
-        assertEquals(mb.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0).getRloc(), mapReply.getMappingRecordItem().get(0).getMappingRecord()
-                .getLocatorRecord().get(0).getRloc());
+        assertEquals(mb.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0).getRloc(),
+                mapReply.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0).getRloc());
         mb = createMapRegister(eid, rloc2);
         mapNotify = lms.handleMapRegister(mb).getLeft();
         assertEquals(8, mapNotify.getNonce().longValue());
@@ -618,24 +623,33 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
 
     private void northboundRetrieveSourceDestKey() throws Exception {
         cleanUP();
-        org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.lispsimpleaddress.primitiveaddress.Ipv4 address1 = (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev150820.lispsimpleaddress.primitiveaddress.Ipv4) LispAddressUtil
+        org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.lispsimpleaddress.primitiveaddress.Ipv4
+                address1 = (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev150820.lispsimpleaddress
+                .primitiveaddress.Ipv4) LispAddressUtil
                 .toPrimitive(LispAddressUtil.asIPAfiAddress("10.0.0.1"));
-        org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.lispsimpleaddress.primitiveaddress.Ipv4 address2 = (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev150820.lispsimpleaddress.primitiveaddress.Ipv4) LispAddressUtil
+        org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.lispsimpleaddress.primitiveaddress.Ipv4
+                address2 = (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev150820.lispsimpleaddress
+                .primitiveaddress.Ipv4) LispAddressUtil
                 .toPrimitive(LispAddressUtil.asIPAfiAddress("10.0.0.2"));
         int mask1 = 32;
         int mask2 = 32;
-        LcafSourceDestAddr sourceDestAddress = new LcafSourceDestAddrBuilder().setAfi(AddressFamilyNumberEnum.LCAF.getIanaCode())
+        LcafSourceDestAddr sourceDestAddress = new LcafSourceDestAddrBuilder().setAfi(
+                AddressFamilyNumberEnum.LCAF.getIanaCode())
                 .setLcafType((short) LispCanonicalAddressFormatEnum.SOURCE_DEST.getLispCode())
-                .setSrcAddress(new SrcAddressBuilder().setPrimitiveAddress(address1).build()).setSrcMaskLength((short) mask1)
-                .setDstAddress(new DstAddressBuilder().setPrimitiveAddress(address2).build()).setDstMaskLength((short) mask2).build();
+                .setSrcAddress(new SrcAddressBuilder().setPrimitiveAddress(address1).build())
+                .setSrcMaskLength((short) mask1)
+                .setDstAddress(new DstAddressBuilder().setPrimitiveAddress(address2).build())
+                .setDstMaskLength((short) mask2).build();
         String pass = "asdf";
 
         lms.addAuthenticationKey(LispAddressUtil.toContainer(sourceDestAddress), mask1, pass);
 
         // URL url = createGetKeyIPv4URL(address1, mask1);
         URL url = createGetKeySourceDestURL(address1.getIpv4Address().getAfi(),
-                ((LispIpv4Address) LispAddressUtil.toAFIfromPrimitive(sourceDestAddress.getSrcAddress().getPrimitiveAddress())).getIpv4Address().getValue(), sourceDestAddress.getSrcMaskLength(),
-                ((LispIpv4Address) LispAddressUtil.toAFIfromPrimitive(sourceDestAddress.getDstAddress().getPrimitiveAddress())).getIpv4Address().getValue(), sourceDestAddress.getDstMaskLength());
+                ((LispIpv4Address) LispAddressUtil.toAFIfromPrimitive(sourceDestAddress.getSrcAddress()
+                .getPrimitiveAddress())).getIpv4Address().getValue(), sourceDestAddress.getSrcMaskLength(),
+                ((LispIpv4Address) LispAddressUtil.toAFIfromPrimitive(sourceDestAddress.getDstAddress()
+                .getPrimitiveAddress())).getIpv4Address().getValue(), sourceDestAddress.getDstMaskLength());
         String reply = callURL("GET", null, "application/json", null, url);
         JSONTokener jt = new JSONTokener(reply);
         JSONObject json = new JSONObject(jt);
@@ -687,24 +701,33 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         mapRequestBuilder.setPitr(false);
         mapRequestBuilder.setEidItem(new ArrayList<EidItem>());
         mapRequestBuilder.getEidItem().add(
-                new EidRecordBuilder().setMask((short) mask).setLispAddressContainer(LispAddressUtil.toContainer(eid)).build());
+                new EidRecordBuilder().setMask((short) mask).setLispAddressContainer(
+                LispAddressUtil.toContainer(eid)).build());
         MapReply mapReply = lms.handleMapRequest(mapRequestBuilder.build());
 
         LispIpv4Address retrievedRloc = (LispIpv4Address) LispAddressUtil.toAFI(
-                mapReply.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0).getLispAddressContainer());
+                mapReply.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0)
+                .getLispAddressContainer());
 
         assertEquals(rloc.getIpv4Address().getValue(), retrievedRloc.getIpv4Address().getValue());
 
     }
 
     private String createMapRegisterJSON(String key, LispIpv4Address eid, int mask, LispIpv4Address rloc) {
-        String jsonString = "{ " + "\"key\" : \"" + key + "\"," + "\"mapregister\" : " + "{ " + "\"proxyMapReply\" : false, "
-                + "\"eidToLocatorRecords\" : " + "[ " + "{ " + "\"authoritative\" : true," + "\"prefixGeneric\" : " + "{ " + "\"ipAddress\" : \""
-                + eid.getIpv4Address().getValue() + "\"," + "\"afi\" : " + eid.getAfi().shortValue() + "}," + "\"mapVersion\" : 0,"
-                + "\"maskLength\" : " + mask + ", " + "\"action\" : \"NoAction\"," + "\"locators\" : " + "[ " + "{ " + "\"multicastPriority\" : 1,"
-                + "\"locatorGeneric\" : " + "{ " + "\"ipAddress\" : \"" + rloc.getIpv4Address().getValue() + "\"," + "\"afi\" : "
-                + rloc.getAfi().shortValue() + "}, " + "\"routed\" : true," + "\"multicastWeight\" : 50," + "\"rlocProbed\" : false, "
-                + "\"localLocator\" : false, " + "\"priority\" : 1, " + "\"weight\" : 50 " + "} " + "], " + "\"recordTtl\" : 100" + "} " + "], "
+        String jsonString = "{ " + "\"key\" : \"" + key + "\"," + "\"mapregister\" : " + "{ "
+                + "\"proxyMapReply\" : false, "
+                + "\"eidToLocatorRecords\" : " + "[ " + "{ " + "\"authoritative\" : true," + "\"prefixGeneric\" : "
+                + "{ " + "\"ipAddress\" : \""
+                + eid.getIpv4Address().getValue() + "\"," + "\"afi\" : " + eid.getAfi().shortValue() + "},"
+                + "\"mapVersion\" : 0,"
+                + "\"maskLength\" : " + mask + ", " + "\"action\" : \"NoAction\"," + "\"locators\" : " + "[ " + "{ "
+                + "\"multicastPriority\" : 1,"
+                + "\"locatorGeneric\" : " + "{ " + "\"ipAddress\" : \"" + rloc.getIpv4Address().getValue() + "\","
+                + "\"afi\" : "
+                + rloc.getAfi().shortValue() + "}, " + "\"routed\" : true," + "\"multicastWeight\" : 50,"
+                + "\"rlocProbed\" : false, "
+                + "\"localLocator\" : false, " + "\"priority\" : 1, " + "\"weight\" : 50 " + "} " + "], "
+                + "\"recordTtl\" : 100" + "} " + "], "
                 + "\"nonce\" : 3," + "\"keyId\" : 0 " + "} " + "}";
 
         return jsonString;
@@ -745,7 +768,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         JSONObject json = new JSONObject(jt);
 
         // With just one locator, locators is not a JSONArray
-        String rlocRetrieved = json.getJSONArray("locators").getJSONObject(0).getJSONObject("locatorGeneric").getString("ipAddress");
+        String rlocRetrieved = json.getJSONArray("locators").getJSONObject(0).getJSONObject("locatorGeneric")
+                .getString("ipAddress");
 
         assertEquals(rloc.getIpv4Address().getValue(), rlocRetrieved);
 
@@ -795,16 +819,23 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
 
     private void northboundRetrieveSourceDestMapping() throws Exception {
         cleanUP();
-        org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.lispsimpleaddress.primitiveaddress.Ipv4 address1 = (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev150820.lispsimpleaddress.primitiveaddress.Ipv4) LispAddressUtil
+        org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.lispsimpleaddress.primitiveaddress.Ipv4
+                address1 = (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev150820.lispsimpleaddress
+                .primitiveaddress.Ipv4) LispAddressUtil
                 .toPrimitive(LispAddressUtil.asIPAfiAddress("10.0.0.1"));
-        org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.lispsimpleaddress.primitiveaddress.Ipv4 address2 = (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev150820.lispsimpleaddress.primitiveaddress.Ipv4) LispAddressUtil
+        org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.lispsimpleaddress.primitiveaddress.Ipv4
+                address2 = (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev150820.lispsimpleaddress
+                .primitiveaddress.Ipv4) LispAddressUtil
                 .toPrimitive(LispAddressUtil.asIPAfiAddress("10.0.0.2"));
         int mask1 = 32;
         int mask2 = 32;
-        LcafSourceDestAddr sourceDestAddress = new LcafSourceDestAddrBuilder().setAfi(AddressFamilyNumberEnum.LCAF.getIanaCode())
+        LcafSourceDestAddr sourceDestAddress = new LcafSourceDestAddrBuilder().setAfi(
+                AddressFamilyNumberEnum.LCAF.getIanaCode())
                 .setLcafType((short) LispCanonicalAddressFormatEnum.SOURCE_DEST.getLispCode())
-                .setSrcAddress(new SrcAddressBuilder().setPrimitiveAddress(address1).build()).setSrcMaskLength((short) mask1)
-                .setDstAddress(new DstAddressBuilder().setPrimitiveAddress(address2).build()).setDstMaskLength((short) mask2).build();
+                .setSrcAddress(new SrcAddressBuilder().setPrimitiveAddress(
+                        address1).build()).setSrcMaskLength((short) mask1)
+                .setDstAddress(new DstAddressBuilder().setPrimitiveAddress(
+                        address2).build()).setDstMaskLength((short) mask2).build();
         LispIpv4Address rloc = LispAddressUtil.asIPAfiAddress("20.0.0.2");
 
         // Insert mapping in the database
@@ -841,42 +872,50 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         JSONObject json = new JSONObject(jt);
 
         // With just one locator, locators is not a JSONArray
-        String rlocRetrieved = json.getJSONArray("locators").getJSONObject(0).getJSONObject("locatorGeneric").getString("ipAddress");
+        String rlocRetrieved = json.getJSONArray("locators").getJSONObject(0).getJSONObject("locatorGeneric")
+        .getString("ipAddress");
 
         assertEquals(rloc.getIpv4Address().getValue(), rlocRetrieved);
 
     }
 
     private URL createGetKeyIPv4URL(LispIpv4Address address, int mask) throws MalformedURLException {
-        String restUrl = String.format("http://localhost:8080/lispflowmapping/nb/v2/default/%s/0/%d/%s/%d", "key", address.getAfi().shortValue(),
+        String restUrl = String.format("http://localhost:8080/lispflowmapping/nb/v2/default/%s/0/%d/%s/%d", "key",
+                address.getAfi().shortValue(),
                 address.getIpv4Address().getValue(), mask);
         URL url = new URL(restUrl);
         return url;
     }
 
-    private URL createGetKeySourceDestURL(int afi, String srcAddress, int srcMask, String dstAddress, int dstMask) throws MalformedURLException {
-        String restUrl = String.format("http://localhost:8080/lispflowmapping/nb/v2/default/%s/0/%d/%s/%d/%s/%d", "key", afi, srcAddress, srcMask,
+    private URL createGetKeySourceDestURL(int afi, String srcAddress, int srcMask, String dstAddress, int dstMask)
+            throws MalformedURLException {
+        String restUrl = String.format("http://localhost:8080/lispflowmapping/nb/v2/default/%s/0/%d/%s/%d/%s/%d",
+                "key", afi, srcAddress, srcMask,
                 dstAddress, dstMask);
         URL url = new URL(restUrl);
         return url;
     }
 
-    private URL createGetMappingSourceDestURL(int afi, String srcAddress, int srcMask, String dstAddress, int dstMask) throws MalformedURLException {
-        String restUrl = String.format("http://localhost:8080/lispflowmapping/nb/v2/default/%s/0/%d/%s/%d/%s/%d", "mapping", afi, srcAddress,
+    private URL createGetMappingSourceDestURL(int afi, String srcAddress, int srcMask, String dstAddress, int dstMask)
+            throws MalformedURLException {
+        String restUrl = String.format("http://localhost:8080/lispflowmapping/nb/v2/default/%s/0/%d/%s/%d/%s/%d",
+                "mapping", afi, srcAddress,
                 srcMask, dstAddress, dstMask);
         URL url = new URL(restUrl);
         return url;
     }
 
     private URL createGetMappingIPv4URL(int iid, LispIpv4Address address, int mask) throws MalformedURLException {
-        String restUrl = String.format("http://localhost:8080/lispflowmapping/nb/v2/default/%s/%d/%d/%s/%d", "mapping", iid, address.getAfi()
+        String restUrl = String.format("http://localhost:8080/lispflowmapping/nb/v2/default/%s/%d/%d/%s/%d", "mapping",
+                iid, address.getAfi()
                 .shortValue(), address.getIpv4Address().getValue(), mask);
         URL url = new URL(restUrl);
         return url;
     }
 
     private URL createDeleteMappingIPv4URL(int iid, LispIpv4Address address, int mask) throws MalformedURLException {
-        String restUrl = String.format("http://localhost:8080/lispflowmapping/nb/v2/default/%s/%d/%d/%s/%d", "mapping", iid, address.getAfi()
+        String restUrl = String.format("http://localhost:8080/lispflowmapping/nb/v2/default/%s/%d/%d/%s/%d", "mapping",
+                iid, address.getAfi()
                 .shortValue(), address.getIpv4Address().getValue(), mask);
         URL url = new URL(restUrl);
         return url;
@@ -897,7 +936,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         return authStringEnc;
     }
 
-    private String callURL(String method, String content, String accept, String body, URL url) throws IOException, JSONException {
+    private String callURL(String method, String content, String accept, String body, URL url) throws IOException,
+            JSONException {
         String authStringEnc = createAuthenticationString();
         connection = (HttpURLConnection) url.openConnection();
         connection.setRequestMethod(method);
@@ -958,7 +998,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
 
     public void eidPrefixLookupIPv6() throws SocketTimeoutException {
         cleanUP();
-        runPrefixTest(LispAddressUtil.asIpv6PrefixEid("1:2:3:4:5:6:7:8/64"), LispAddressUtil.asIpv6PrefixEid("1:2:3:4:5:1:2:3/128"),
+        runPrefixTest(LispAddressUtil.asIpv6PrefixEid("1:2:3:4:5:6:7:8/64"),
+                LispAddressUtil.asIpv6PrefixEid("1:2:3:4:5:1:2:3/128"),
                 LispAddressUtil.asIpv6PrefixEid("1:2:3:1:2:3:1:2/128"));
     }
 
@@ -1016,7 +1057,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         sendMapRequest(mapRequest.build());
         MapReply mapReply = receiveMapReply();
         assertEquals(4, mapReply.getNonce().longValue());
-        assertEquals(record.getRloc(), mapReply.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0).getRloc());
+        assertEquals(record.getRloc(), mapReply.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord()
+                .get(0).getRloc());
         mapRequest.setEidItem(new ArrayList<EidItem>());
         mapRequest.getEidItem().add(new EidItemBuilder().setEid(unMatchedAddress).build());
         sendMapRequest(mapRequest.build());
@@ -1041,8 +1083,10 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         LOG.trace("Sending this JSON to LISP server: \n" + jsonAuthData);
         LOG.trace("Address: " + address);
 
-        byte[] expectedSha = new byte[] { (byte) 146, (byte) 234, (byte) 52, (byte) 247, (byte) 186, (byte) 232, (byte) 31, (byte) 249, (byte) 87,
-                (byte) 73, (byte) 234, (byte) 54, (byte) 225, (byte) 160, (byte) 129, (byte) 251, (byte) 73, (byte) 53, (byte) 196, (byte) 62 };
+        byte[] expectedSha = new byte[] { (byte) 146, (byte) 234, (byte) 52, (byte) 247, (byte) 186, (byte) 232,
+                (byte) 31, (byte) 249, (byte) 87,
+                (byte) 73, (byte) 234, (byte) 54, (byte) 225, (byte) 160, (byte) 129, (byte) 251, (byte) 73, (byte) 53,
+                (byte) 196, (byte) 62 };
 
         byte[] zeros = new byte[20];
 
@@ -1108,7 +1152,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
 
         mapRegister.setKeyId((short) 1); // LispKeyIDEnum.SHA1.getKeyID()
         mapRegister
-                .setAuthenticationData(new byte[] { -15, -52, 38, -94, 125, -111, -68, -79, 68, 6, 101, 45, -1, 47, -4, -67, -113, 104, -110, -71 });
+                .setAuthenticationData(new byte[] { -15, -52, 38, -94, 125, -111, -68, -79, 68, 6, 101, 45, -1, 47, -4,
+                -67, -113, 104, -110, -71 });
 
         sendMapRegister(mapRegister.build());
 
@@ -1116,7 +1161,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
 
         etlr.setLispAddressContainer(LispAddressUtil.toContainer(addressOutOfRange));
         mapRegister
-                .setAuthenticationData(new byte[] { -54, 68, -58, -91, -23, 22, -88, -31, 113, 39, 115, 78, -68, -123, -71, -14, -99, 67, -23, -73 });
+                .setAuthenticationData(new byte[] { -54, 68, -58, -91, -23, 22, -88, -31, 113, 39, 115, 78, -68, -123,
+                -71, -14, -99, 67, -23, -73 });
 
         sendMapRegister(mapRegister.build());
         assertNoPacketReceived(3000);
@@ -1150,7 +1196,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         etlrBuilder.setLocatorRecord(new ArrayList<LocatorRecord>());
         etlrBuilder.getLocatorRecord().add(recordBuilder.build());
         mapRegisterBuilder.setMappingRecordItem(new ArrayList<MappingRecordItem>());
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(etlrBuilder.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(
+                new MappingRecordItemBuilder().setMappingRecord(etlrBuilder.build()).build());
         sendMapRegister(mapRegisterBuilder.build());
         MapNotify mapNotify = receiveMapNotify();
         assertEquals(8, mapNotify.getNonce().longValue());
@@ -1165,7 +1212,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         if (srcEid != null) {
             mapRequestBuilder.setSourceEid(new SourceEidBuilder().setEid(LispAddressUtil.asIpv4Eid(srcEid)).build());
         } else {
-            mapRequestBuilder.setSourceEid(new SourceEidBuilder().setEid(LispAddressUtil.asIpv4Eid(ourAddress)).build());
+            mapRequestBuilder.setSourceEid(new SourceEidBuilder().setEid(LispAddressUtil.asIpv4Eid(ourAddress))
+                    .build());
         }
         mapRequestBuilder.getItrRloc().add(
                 new ItrRlocBuilder().setRloc(LispAddressUtil.asIpv4Rloc(ourAddress)).build());
@@ -1208,7 +1256,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         etlrBuilder.setLocatorRecord(new ArrayList<LocatorRecord>());
         etlrBuilder.getLocatorRecord().add(recordBuilder.build());
         mapRegisterBuilder.setMappingRecordItem(new ArrayList<MappingRecordItem>());
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(etlrBuilder.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(
+                etlrBuilder.build()).build());
         sendMapRegister(mapRegisterBuilder.build());
         MapNotify mapNotify = receiveMapNotify();
         assertEquals(8, mapNotify.getNonce().longValue());
@@ -1241,14 +1290,15 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         String macString = "01:02:03:04:05:06";
 
         SourceDestKeyBuilder builder = new SourceDestKeyBuilder();
-        builder.setSource(new SimpleAddress(new IpPrefix(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Prefix(ipPrefix))));
+        builder.setSource(new SimpleAddress(new IpPrefix(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang
+                .ietf.inet.types.rev100924.Ipv4Prefix(ipPrefix))));
         builder.setDest(new SimpleAddress(new MacAddress(macString)));
 
         EidBuilder eb = new EidBuilder();
         eb.setAddressType(SourceDestKeyLcaf.class);
         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.SourceDestKeyBuilder()
-                .setSourceDestKey(builder.build()).build());
+        eb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.SourceDestKeyBuilder().setSourceDestKey(builder.build()).build());
 
         MapReply reply = registerAddressAndQuery(eb.build());
 
@@ -1355,8 +1405,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         EidBuilder eb = new EidBuilder();
         eb.setAddressType(AfiListLcaf.class);
         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.AfiListBuilder()
-                .setAfiList(listbuilder.build()).build());
+        eb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.AfiListBuilder().setAfiList(listbuilder.build()).build());
 
         MapReply reply = registerAddressAndQuery(eb.build());
 
@@ -1383,8 +1433,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         EidBuilder eb = new EidBuilder();
         eb.setAddressType(Ipv4PrefixAfi.class);
         eb.setVirtualNetworkId(new InstanceIdType((long) instanceId));
-        eb.setAddress(new Ipv4PrefixBuilder().setIpv4Prefix(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Prefix(
-                ipString)).build());
+        eb.setAddress(new Ipv4PrefixBuilder().setIpv4Prefix(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns
+                .yang.ietf.inet.types.rev100924.Ipv4Prefix(ipString)).build());
 
         MapReply reply = registerAddressAndQuery(eb.build());
 
@@ -1415,14 +1465,16 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         EidBuilder eb = new EidBuilder();
         eb.setAddressType(ExplicitLocatorPathLcaf.class);
         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.ExplicitLocatorPathBuilder()
-                .setExplicitLocatorPath(elpBuilder.build()).build());
+        eb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.ExplicitLocatorPathBuilder().setExplicitLocatorPath(elpBuilder.build()).build());
 
         MapReply reply = registerAddressAndQuery(eb.build());
 
-        assertEquals(ExplicitLocatorPathLcaf.class, reply.getMappingRecordItem().get(0).getMappingRecord().getEid().getAddressType());
+        assertEquals(ExplicitLocatorPathLcaf.class, reply.getMappingRecordItem().get(0).getMappingRecord().getEid()
+                .getAddressType());
 
-        ExplicitLocatorPath receivedAddress = (ExplicitLocatorPath) reply.getMappingRecordItem().get(0).getMappingRecord().getEid().getAddress();
+        ExplicitLocatorPath receivedAddress = (ExplicitLocatorPath) reply.getMappingRecordItem().get(0)
+                .getMappingRecord().getEid().getAddress();
 
         Hop receivedHop1 = (Hop) receivedAddress.getExplicitLocatorPath().getHop().get(0);
         Hop receivedHop2 = (Hop) receivedAddress.getExplicitLocatorPath().getHop().get(1);
@@ -1464,8 +1516,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         EidBuilder eb = new EidBuilder();
         eb.setAddressType(ApplicationDataLcaf.class);
         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.ApplicationDataBuilder()
-                .setApplicationData(builder.build()).build());
+        eb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.ApplicationDataBuilder().setApplicationData(builder.build()).build());
         Eid addressToSend = eb.build();
 
         MapReply reply = registerAddressAndQuery(addressToSend);
@@ -1477,10 +1529,14 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         ApplicationData receivedApplicationDataAddress = (ApplicationData) receivedAddress.getAddress();
         assertEquals(protocol, receivedApplicationDataAddress.getApplicationData().getProtocol().intValue());
         assertEquals(ipTOs, receivedApplicationDataAddress.getApplicationData().getIpTos().intValue());
-        assertEquals(localPortLow, receivedApplicationDataAddress.getApplicationData().getLocalPortLow().getValue().intValue());
-        assertEquals(localPortHigh, receivedApplicationDataAddress.getApplicationData().getLocalPortHigh().getValue().intValue());
-        assertEquals(remotePortLow, receivedApplicationDataAddress.getApplicationData().getRemotePortLow().getValue().intValue());
-        assertEquals(remotePortHigh, receivedApplicationDataAddress.getApplicationData().getRemotePortHigh().getValue().intValue());
+        assertEquals(localPortLow, receivedApplicationDataAddress.getApplicationData().getLocalPortLow().getValue()
+                .intValue());
+        assertEquals(localPortHigh, receivedApplicationDataAddress.getApplicationData().getLocalPortHigh().getValue()
+                .intValue());
+        assertEquals(remotePortLow, receivedApplicationDataAddress.getApplicationData().getRemotePortLow().getValue()
+                .intValue());
+        assertEquals(remotePortHigh, receivedApplicationDataAddress.getApplicationData().getRemotePortHigh().getValue()
+                .intValue());
 
         SimpleAddress ipAddressReceived = receivedApplicationDataAddress.getApplicationData().getAddress();
         assertEquals(ipString, ipAddressReceived.getIpAddress().getIpv4Address().getValue());
@@ -1665,7 +1721,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         RlocBuilder rb = new RlocBuilder();
         rb.setAddressType(ApplicationDataLcaf.class);
         rb.setVirtualNetworkId(null);
-        rb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.ApplicationDataBuilder()
+        rb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.ApplicationDataBuilder()
                 .setApplicationData(new ApplicationDataBuilder().setAddress(new SimpleAddress(new IpAddress(
                 new Ipv4Address(rloc)))).setLocalPortLow(new PortNumber(port)).build()).build());
         Rloc adLcaf = rb.build();
@@ -1714,13 +1771,15 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         RlocBuilder rb = new RlocBuilder();
         rb.setAddressType(ApplicationDataLcaf.class);
         rb.setVirtualNetworkId(null);
-        rb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.ApplicationDataBuilder()
+        rb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.ApplicationDataBuilder()
                 .setApplicationData(new ApplicationDataBuilder().setAddress(new SimpleAddress(new IpAddress(
                 new Ipv4Address(rloc)))).setLocalPortLow(new PortNumber(port)).build()).build());
         Rloc adLcaf = rb.build();
 
         final MapRequest mapRequest = createNonProxyMapRequest(eid, adLcaf);
-        ((LispMappingService) lms).getNotificationService().registerNotificationListener(new XtrRequestMappingListener() {
+        ((LispMappingService) lms).getNotificationService().registerNotificationListener(
+                new XtrRequestMappingListener() {
 
             @Override
             public void onXtrRequestMapping(XtrRequestMapping notification) {
@@ -1744,7 +1803,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
 
     }
 
-    private void sendProxyMapRequest(String rloc, int port, Rloc adLcaf) throws SocketTimeoutException, SocketException {
+    private void sendProxyMapRequest(String rloc, int port, Rloc adLcaf) throws SocketTimeoutException,
+            SocketException {
         String eid = "10.1.0.1/32";
         MapRequest mapRequest = createNonProxyMapRequest(eid, adLcaf);
         sendMapRequest(mapRequest);
@@ -1780,7 +1840,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
     }
 
     private MapRequest receiveMapRequest(DatagramSocket datagramSocket) throws SocketTimeoutException {
-        return MapRequestSerializer.getInstance().deserialize(ByteBuffer.wrap(receivePacket(datagramSocket, 30000).getData()));
+        return MapRequestSerializer.getInstance().deserialize(ByteBuffer.wrap(receivePacket(
+                datagramSocket, 30000).getData()));
     }
 
     private MapNotify receiveMapNotify() throws SocketTimeoutException {
@@ -1903,8 +1964,8 @@ public class MappingServiceIntegrationTest extends AbstractMdsalTestBase {
         Bundle b[] = bc.getBundles();
         for (Bundle element : b) {
             int state = element.getState();
-            LOG.trace("Bundle[" + element.getBundleId() + "]:" + element.getSymbolicName() + ",v" + element.getVersion() + ", state:"
-                    + stateToString(state));
+            LOG.trace("Bundle[" + element.getBundleId() + "]:" + element.getSymbolicName() + ",v"
+                    + element.getVersion() + ", state:" + stateToString(state));
             if (state != Bundle.ACTIVE && state != Bundle.RESOLVED) {
                 LOG.debug("Bundle:" + element.getSymbolicName() + " state:" + stateToString(state));
 
index 347d33fd5dac88bed230b82b6e9d07e5db5cbd3c..7046bc41b58a5270e02882b23f8b2ad39f5f5544 100644 (file)
@@ -63,8 +63,10 @@ public class LispMappingService implements IFlowMapping, BindingAwareProvider, I
     private volatile String elpPolicy = ConfigIni.getInstance().getElpPolicy();
 
     private ThreadLocal<MapReply> tlsMapReply = new ThreadLocal<MapReply>();
-    private ThreadLocal<Pair<MapNotify, List<TransportAddress>>> tlsMapNotify = new ThreadLocal<Pair<MapNotify, List<TransportAddress>>>();
-    private ThreadLocal<Pair<MapRequest, TransportAddress>> tlsMapRequest = new ThreadLocal<Pair<MapRequest, TransportAddress>>();
+    private ThreadLocal<Pair<MapNotify, List<TransportAddress>>> tlsMapNotify =
+            new ThreadLocal<Pair<MapNotify, List<TransportAddress>>>();
+    private ThreadLocal<Pair<MapRequest, TransportAddress>> tlsMapRequest =
+            new ThreadLocal<Pair<MapRequest, TransportAddress>>();
 
     private OdlLispSbService lispSB = null;
     private IMapResolverAsync mapResolver;
index 9146377598e74c37d57d03f2f24baf184c0d8a50..295802bd2bfd4ab5f7aa548ffe72c793d86f525d 100644 (file)
@@ -23,8 +23,10 @@ public final class LispAuthenticationFactory {
     private static void initializeMap() {
         keyIDToAuthenticationMap = new HashMap<LispKeyIDEnum, ILispAuthentication>();
         keyIDToAuthenticationMap.put(LispKeyIDEnum.NONE, LispNoAuthentication.getInstance());
-        keyIDToAuthenticationMap.put(LispKeyIDEnum.SHA1, new LispMACAuthentication(LispKeyIDEnum.SHA1.getAuthenticationName()));
-        keyIDToAuthenticationMap.put(LispKeyIDEnum.SHA256, new LispMACAuthentication(LispKeyIDEnum.SHA256.getAuthenticationName()));
+        keyIDToAuthenticationMap.put(LispKeyIDEnum.SHA1,
+                new LispMACAuthentication(LispKeyIDEnum.SHA1.getAuthenticationName()));
+        keyIDToAuthenticationMap.put(LispKeyIDEnum.SHA256,
+                new LispMACAuthentication(LispKeyIDEnum.SHA256.getAuthenticationName()));
         keyIDToAuthenticationMap.put(LispKeyIDEnum.UNKNOWN, LispNoAuthentication.getInstance());
 
     }
index 22a7aad6fe859281966d53ed061c18d72e34dad1..9d90c1ad7d5a7a717c4954951d35b154b2471c1b 100644 (file)
@@ -43,7 +43,8 @@ public final class LispAuthenticationUtil {
 
     public static byte[] createAuthenticationData(MapNotify mapNotify, String key) {
         // We assume that the key-ID is correctly set in the Map-Notify message
-        ILispAuthentication authentication = LispAuthenticationFactory.getAuthentication(LispKeyIDEnum.valueOf(mapNotify.getKeyId()));
+        ILispAuthentication authentication = LispAuthenticationFactory.getAuthentication(
+                LispKeyIDEnum.valueOf(mapNotify.getKeyId()));
         return authentication.getAuthenticationData(mapNotify, key);
     }
 
index 592d46719b37baf2988953bd683ed50fc7d6fa03..5fa3ec87ac3017db8fede1a92b97bd3befbe98e8 100644 (file)
@@ -54,7 +54,8 @@ public class LispMACAuthentication implements ILispAuthentication {
         mapRegisterBuffer.position(MAP_REGISTER_AND_NOTIFY_AUTHENTICATION_POSITION);
         mapRegisterBuffer.put(tempAuthenticationData);
         mapRegisterBuffer.position(0);
-        return Arrays.equals(getAuthenticationData(mapRegisterBuffer.array(), key), mapRegister.getAuthenticationData());
+        return Arrays.equals(getAuthenticationData(mapRegisterBuffer.array(), key),
+                mapRegister.getAuthenticationData());
     }
 
     protected byte[] getAuthenticationData(byte[] data, String key) {
index bcbb977b8c18988cad6a7edcb82d7ab832faedd6..8fe09b3bc8d4b614cc6eae17c6c4cba16c53664f 100644 (file)
@@ -215,7 +215,8 @@ public class MapResolver implements IMapResolverAsync {
                                     .setRlocProbed(record.isRlocProbed()).setWeight(record.getWeight())
                                     .setPriority(priority).setMulticastWeight(record.getMulticastWeight())
                                     .setMulticastPriority(record.getMulticastPriority()).setRouted(record.isRouted())
-                                    .setRloc(LispAddressUtil.toRloc(nextHop)).setLocatorId(record.getLocatorId()).build());
+                                    .setRloc(LispAddressUtil.toRloc(nextHop))
+                                    .setLocatorId(record.getLocatorId()).build());
                 }
             }
         } catch (ClassCastException cce) {
index bec12db39782578cd85109124e1bf44338aa15d6..ee1500c58c7b895514e239655846f536c6e93f1f 100644 (file)
@@ -132,7 +132,8 @@ public class MappingDataListener extends AbstractDataListener {
 
                 mapSystem.removeMapping(mapping.getOrigin(), mapping.getMappingRecord().getEid());
                 try {
-                    notificationPublishService.putNotification(MSNotificationInputUtil.toMappingChanged(mapping, MappingChange.Removed));
+                    notificationPublishService.putNotification(MSNotificationInputUtil.toMappingChanged(
+                            mapping, MappingChange.Removed));
                 } catch (InterruptedException e) {
                     LOG.warn("Notification publication interrupted!");
                 }
index f4a5c9e7bbb799ae23e2060de9152ae65aaa20c0..2814d22145a24c712b4bb12c44d264caa0be494e 100644 (file)
@@ -40,7 +40,8 @@ public final class InstanceIdentifierUtil {
     public static InstanceIdentifier<AuthenticationKey> createAuthenticationKeyIid(Eid eid) {
         Preconditions.checkNotNull(eid, "Key needs and EID entry!");
 
-        VirtualNetworkIdentifierKey vniKey = new VirtualNetworkIdentifierKey(new VniUri(Long.toString(getLispInstanceId(eid))));
+        VirtualNetworkIdentifierKey vniKey = new VirtualNetworkIdentifierKey(new VniUri(
+                Long.toString(getLispInstanceId(eid))));
         AuthenticationKeyKey authKeyKey = new AuthenticationKeyKey(new EidUri(getURIAddressString(eid)));
         return InstanceIdentifier.create(MappingDatabase.class)
                 .child(VirtualNetworkIdentifier.class, vniKey).child(AuthenticationKey.class, authKeyKey);
@@ -49,7 +50,8 @@ public final class InstanceIdentifierUtil {
     public static InstanceIdentifier<Mapping> createMappingIid(Eid eid, MappingOrigin orig) {
         Preconditions.checkNotNull(eid, "Mapping needs an EID entry!");
 
-        VirtualNetworkIdentifierKey vniKey = new VirtualNetworkIdentifierKey(new VniUri(Long.toString(getLispInstanceId(eid))));
+        VirtualNetworkIdentifierKey vniKey = new VirtualNetworkIdentifierKey(new VniUri(
+                Long.toString(getLispInstanceId(eid))));
         MappingKey eidKey = new MappingKey(new EidUri(getURIAddressString(eid)), orig);
         return InstanceIdentifier.create(MappingDatabase.class)
                 .child(VirtualNetworkIdentifier.class, vniKey).child(Mapping.class, eidKey);
index b090b1262e65d421a944aebc6d197b1a280a8c8f..8b1176838cc5d3da4d2bd3117e9a6eec11531bf3 100644 (file)
@@ -96,7 +96,8 @@ public final class LispNotificationHelper {
     public static List<Mapping> getMapping(AddMapping mapRegisterNotification) {
         List<Mapping> mappings = new ArrayList<Mapping>();
         for (int i=0; i<mapRegisterNotification.getMapRegister().getMappingRecordItem().size(); i++) {
-            MappingRecord record = mapRegisterNotification.getMapRegister().getMappingRecordItem().get(i).getMappingRecord();
+            MappingRecord record = mapRegisterNotification.getMapRegister().getMappingRecordItem().get(i)
+                    .getMappingRecord();
             MappingBuilder mb = new MappingBuilder();
             mb.setEidUri(new EidUri(LispAddressStringifier.getURIString(
                     record.getEid())));
index cd76b96dbb9690093f0eac4b887c440892b60b36..9bf034de9fd093de3e585ec6d2332bb22504938d 100644 (file)
@@ -48,10 +48,10 @@ public class LispAuthenticationTest extends BaseTestCase {
         // Local RLOC: 192.168.136.10 (RLOC=0xC0A8880A), Reachable,
         // Priority/Weight: 1/100, Multicast Priority/Weight: 255/0
         //
-        MapRegister mapRegister = MapRegisterSerializer.getInstance().deserialize(hexToByteBuffer("38 00 01 01 FF BB " //
-                + "00 00 00 00 00 00 00 01 00 14 e8 f5 0b c5 c5 f2 " //
-                + "b0 21 27 a8 21 41 04 f3 46 5a 5a 5b 5c 5d 00 00 " //
-                + "00 0a 01 20 10 00 00 00 00 01 99 10 fe 01 01 64 " //
+        MapRegister mapRegister = MapRegisterSerializer.getInstance().deserialize(hexToByteBuffer("38 00 01 01 FF BB "
+                + "00 00 00 00 00 00 00 01 00 14 e8 f5 0b c5 c5 f2 "
+                + "b0 21 27 a8 21 41 04 f3 46 5a 5a 5b 5c 5d 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"), null);
 
         assertFalse(LispAuthenticationUtil.validate(mapRegister, EID, PASSWORD));
@@ -70,9 +70,9 @@ public class LispAuthenticationTest extends BaseTestCase {
         // Local RLOC: 192.168.136.10 (RLOC=0xC0A8880A), Reachable,
         // Priority/Weight: 1/100, Multicast Priority/Weight: 255/0
         //
-        MapRegister mapRegister = MapRegisterSerializer.getInstance().deserialize(hexToByteBuffer("38 00 01 01 FF BB " //
-                + "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 " //
+        MapRegister mapRegister = MapRegisterSerializer.getInstance().deserialize(hexToByteBuffer("38 00 01 01 FF BB "
+                + "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"), null);
 
         assertTrue(LispAuthenticationUtil.validate(mapRegister, EID, PASSWORD));
@@ -96,9 +96,12 @@ public class LispAuthenticationTest extends BaseTestCase {
         MapRegister mapRegister = MapRegisterSerializer
                 .getInstance()
                 .deserialize(
-                        hexToByteBuffer("38 00 01 01 FF BB " //
-                                + "00 00 00 00 00 00 00 02 00 20 70 30 d4 c6 10 44 0d 83 be 4d bf fd a9 8c 57 6d 68 a5 bf 32 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 " //
+                        hexToByteBuffer("38 00 01 01 FF BB "
+                                + "00 00 00 00 00 00 00 02 00 20 "
+                                + "70 30 d4 c6 10 44 0d 83 be 4d bf fd a9 8c 57 6d "
+                                + "68 a5 bf 32 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"), null);
 
         assertTrue(LispAuthenticationUtil.validate(mapRegister, EID, PASSWORD));
@@ -117,10 +120,10 @@ public class LispAuthenticationTest extends BaseTestCase {
         // Local RLOC: 192.168.136.10 (RLOC=0xC0A8880A), Reachable,
         // Priority/Weight: 1/100, Multicast Priority/Weight: 255/0
         //
-        MapRegister mapRegister = MapRegisterSerializer.getInstance().deserialize(hexToByteBuffer("38 00 01 01 FF BB " //
-                + "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 " //
+        MapRegister mapRegister = MapRegisterSerializer.getInstance().deserialize(hexToByteBuffer("38 00 01 01 FF BB "
+                + "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"), null);
 
         assertTrue(LispAuthenticationUtil.validate(mapRegister, EID, PASSWORD));
@@ -180,7 +183,8 @@ public class LispAuthenticationTest extends BaseTestCase {
         etlrBuilder.setRecordTtl(55);
         mapNotifyBuilder.getMappingRecordItem().add(
                 new MappingRecordItemBuilder().setMappingRecord(etlrBuilder.build()).build());
-        ArrayAssert.assertEquals(new byte[0], LispAuthenticationUtil.createAuthenticationData(mapNotifyBuilder.build(), "password"));
+        ArrayAssert.assertEquals(new byte[0], LispAuthenticationUtil.createAuthenticationData(mapNotifyBuilder.build(),
+                "password"));
 
     }
 }
index 5f74e2569e4a1136a152a23b62f632e192bde7e4..033f6c493b8262bb37df7efb0f97753583daad71 100644 (file)
@@ -98,7 +98,8 @@ public class MapResolverTest extends BaseTestCase {
 
         MappingRecord eidToLocators = mapReply.getMappingRecordItem().get(0).getMappingRecord();
         assertEquals(1, eidToLocators.getLocatorRecord().size());
-        LocatorRecord resultLocator = mapReply.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0);
+        LocatorRecord resultLocator = mapReply.getMappingRecordItem().get(0).getMappingRecord()
+                .getLocatorRecord().get(0);
         assertEquals(locator.isLocalLocator(), resultLocator.isLocalLocator());
         assertEquals(locator.isRouted(), resultLocator.isRouted());
         assertEquals(locator.getMulticastPriority(), resultLocator.getMulticastPriority());
index 1491db09bc680f5f29f77f8ec19707df87af5839..80ac732f64fc35b8fc99e6c55d440e8d93c68a4d 100644 (file)
@@ -96,14 +96,16 @@ public class MapServerTest extends BaseTestCase {
         recordBuilder.setEid(eid);
         recordBuilder.setLocatorRecord(new ArrayList<LocatorRecord>());
         recordBuilder.getLocatorRecord().add(new LocatorRecordBuilder().setRloc(rloc).build());
-        recordBuilder.setAction(Action.NoAction).setMapVersion((short) 0).setAuthoritative(false).setRecordTtl(60).setMaskLength((short) 32);
+        recordBuilder.setAction(Action.NoAction).setMapVersion((short) 0).setAuthoritative(false).setRecordTtl(60)
+                .setMaskLength((short) 32);
         mapRegisterBuilder.setMappingRecordItem(new ArrayList<MappingRecordItem>());
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).build());
-        mapRegisterWithAuthentication = MapRegisterSerializer.getInstance().deserialize(hexToByteBuffer("38 00 01 01 FF BB "
-        //
-                + "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 " //
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(recordBuilder.build()).build());
+        mapRegisterWithAuthentication = MapRegisterSerializer.getInstance().deserialize(
+                hexToByteBuffer("38 00 01 01 FF BB "
+                + "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"), null);
 
         mappingEntriesSaver = new ValueSaverAction<MappingEntry<?>[]>();
@@ -154,7 +156,8 @@ public class MapServerTest extends BaseTestCase {
         locatorBuilder.setPriority((short) 55);
         eidToLocatorBuilder.getLocatorRecord().add(locatorBuilder.build());
 
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(eidToLocatorBuilder.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(eidToLocatorBuilder.build()).build());
 
         addDefaultPutAndGetExpectations(eid);
 
@@ -176,7 +179,8 @@ public class MapServerTest extends BaseTestCase {
         LocatorRecordBuilder locator = getDefaultLocatorBuilder();
         locator.setRloc(rloc);
         recordBuilder.getLocatorRecord().add(locator.build());
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(recordBuilder.build()).build());
         mapRegisterBuilder.setWantMapNotify(true);
         MapRegister mr = mapRegisterBuilder.build();
 
@@ -200,7 +204,8 @@ public class MapServerTest extends BaseTestCase {
         locatorBuilder.setRloc(rloc);
         recordBuilder.setEid(addr).setMaskLength((short) mask);
         recordBuilder.getLocatorRecord().add(locatorBuilder.build());
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(recordBuilder.build()).build());
         mapRegisterBuilder.setWantMapNotify(true);
 
         addDefaultPutAndGetExpectations(addr);
@@ -225,7 +230,8 @@ public class MapServerTest extends BaseTestCase {
         locatorBuilder.setRloc(rloc);
         recordBuilder.setEid(addr).setMaskLength((short) mask);
         recordBuilder.getLocatorRecord().add(locatorBuilder.build());
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(recordBuilder.build()).build());
         mapRegisterBuilder.setWantMapNotify(true);
 
         addDefaultPutAndGetExpectations(addr);
@@ -250,7 +256,8 @@ public class MapServerTest extends BaseTestCase {
         LocatorRecordBuilder locator = getDefaultLocatorBuilder();
         locator.setRloc(rloc);
         recordBuilder.getLocatorRecord().add(locator.build());
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(recordBuilder.build()).build());
         mapRegisterBuilder.setWantMapNotify(true);
         MapRegister mr = mapRegisterBuilder.build();
 
@@ -273,7 +280,8 @@ public class MapServerTest extends BaseTestCase {
         LocatorRecordBuilder locator = getDefaultLocatorBuilder();
         locator.setRloc(rloc);
         recordBuilder.getLocatorRecord().add(locator.build());
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(recordBuilder.build()).build());
         mapRegisterBuilder.setWantMapNotify(true);
         MapRegister mr = mapRegisterBuilder.build();
 
@@ -297,7 +305,8 @@ public class MapServerTest extends BaseTestCase {
         locatorBuilder.setRloc(rloc);
         recordBuilder.setEid(addr).setMaskLength((short) mask);
         recordBuilder.getLocatorRecord().add(locatorBuilder.build());
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(recordBuilder.build()).build());
         mapRegisterBuilder.setWantMapNotify(true);
 
         addDefaultPutAndGetExpectations(addr);
@@ -322,7 +331,8 @@ public class MapServerTest extends BaseTestCase {
         locatorBuilder.setRloc(rloc);
         recordBuilder.setEid(addr).setMaskLength((short) mask);
         recordBuilder.getLocatorRecord().add(locatorBuilder.build());
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(recordBuilder.build()).build());
         mapRegisterBuilder.setWantMapNotify(true);
 
         addDefaultPutAndGetExpectations(addr);
@@ -347,7 +357,8 @@ public class MapServerTest extends BaseTestCase {
         locatorBuilder.setRloc(rloc);
         recordBuilder.setEid(addr).setMaskLength((short) mask);
         recordBuilder.getLocatorRecord().add(locatorBuilder.build());
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(recordBuilder.build()).build());
         mapRegisterBuilder.setWantMapNotify(true);
 
         addDefaultPutAndGetExpectations(addr);
@@ -372,7 +383,8 @@ public class MapServerTest extends BaseTestCase {
         locatorBuilder.setRloc(rloc);
         recordBuilder.setEid(addr).setMaskLength((short) mask);
         recordBuilder.getLocatorRecord().add(locatorBuilder.build());
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(recordBuilder.build()).build());
         mapRegisterBuilder.setWantMapNotify(true);
 
         addDefaultPutAndGetExpectations(addr);
@@ -400,8 +412,10 @@ public class MapServerTest extends BaseTestCase {
         locatorBuilder.setRloc(rloc);
         recordBuilder1.setEid(addr).setMaskLength((short) mask);
         recordBuilder1.getLocatorRecord().add(locatorBuilder.build());
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(recordBuilder0.build()).build());
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(recordBuilder1.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(recordBuilder0.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(recordBuilder1.build()).build());
         mapRegisterBuilder.setWantMapNotify(true);
 
         addDefaultPutAndGetExpectations(eid);
@@ -434,7 +448,8 @@ public class MapServerTest extends BaseTestCase {
         recordBuilder.getLocatorRecord().add(locatorBuilder1.build());
         recordBuilder.getLocatorRecord().add(locatorBuilder2.build());
 
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(recordBuilder.build()).build());
 
         testedMapServer.handleMapRegister(mapRegisterBuilder.build());
 
@@ -458,7 +473,8 @@ public class MapServerTest extends BaseTestCase {
         // LispAFIAddress rloc1 =
         // LispAddressUtil.asIPv6AfiAddress("0:0:0:0:0:0:0:7");
         String subkey = "bla";
-        Rloc rloc1 = LispAddressUtil.asKeyValueAddress(subkey, SimpleAddressBuilder.getDefaultInstance("0:0:0:0:0:0:0:7"));
+        Rloc rloc1 = LispAddressUtil.asKeyValueAddress(subkey,
+                SimpleAddressBuilder.getDefaultInstance("0:0:0:0:0:0:0:7"));
         MappingRecordBuilder recordBuilder = getDefaultMappingRecordBuilder();
         recordBuilder.setEid(eid);
         LocatorRecordBuilder locatorBuilder1 = getDefaultLocatorBuilder();
@@ -468,7 +484,8 @@ public class MapServerTest extends BaseTestCase {
         recordBuilder.getLocatorRecord().add(locatorBuilder1.build());
         recordBuilder.getLocatorRecord().add(locatorBuilder2.build());
 
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(recordBuilder.build()).build());
 
         testedMapServer.handleMapRegister(mapRegisterBuilder.build());
 
@@ -520,7 +537,8 @@ public class MapServerTest extends BaseTestCase {
         recordBuilder.getLocatorRecord().add(locatorBuilder.build());
 
         mapRegisterBuilder = getDefaultMapRegisterBuilder();
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(recordBuilder.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(recordBuilder.build()).build());
 
         testedMapServer.handleMapRegister(mapRegisterBuilder.build());
     }
@@ -545,8 +563,10 @@ public class MapServerTest extends BaseTestCase {
         etlr2Builder.getLocatorRecord().add(
                 getDefaultLocatorBuilder().setPriority((short) 10)
                         .setRloc(LispAddressUtil.asIpv4Rloc("2.2.2.2")).build());
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(etlrBuilder.build()).build());
-        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder().setMappingRecord(etlr2Builder.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(etlrBuilder.build()).build());
+        mapRegisterBuilder.getMappingRecordItem().add(new MappingRecordItemBuilder()
+                .setMappingRecord(etlr2Builder.build()).build());
         addDefaultPutAndGetExpectations(address);
         MapNotify mapNotify = testedMapServer.handleMapRegister(mapRegisterBuilder.build()).getLeft();
 
index 82bac8fbc03c279e34591743d74bb51ef3f48a4b..12b7a2e692cfb7f595c8d8e78fb12c3f22aba8d8 100644 (file)
@@ -73,7 +73,8 @@ public class MappingServiceTest extends BaseTestCase {
         MappingAuthkey authKey = new MappingAuthkeyBuilder().setKeyType(1).setKeyString("pass").build();
         MappingEntry<MappingAuthkey> keyMappingEntry = new MappingEntry<>(SubKeys.AUTH_KEY, authKey);
         Eid key = getDefaultKey();
-        MappingEntry<MappingAuthkey>[] authKeys =(MappingEntry<MappingAuthkey>[]) (Arrays.asList(keyMappingEntry).toArray());
+        MappingEntry<MappingAuthkey>[] authKeys =(MappingEntry<MappingAuthkey>[])
+                (Arrays.asList(keyMappingEntry).toArray());
         addDsbeAddKeyExpectation();
         oneOf(dao).put(weq(key), weq(authKeys));
         mapService.addAuthenticationKey(eid, authKey);
index e3474c2eeedd3a1d6cff78004038e387481e1f5f..00b704be5998d66787e12c34b91e2014d463b178 100644 (file)
@@ -52,8 +52,8 @@ public final class LocatorRecordSerializer {
         replyBuffer.put((byte) NumberUtil.asShort(record.getMulticastPriority()));
         replyBuffer.put((byte) NumberUtil.asShort(record.getMulticastWeight()));
         replyBuffer.position(replyBuffer.position() + Length.UNUSED_FLAGS);
-        replyBuffer.put((byte) (ByteUtil.boolToBit(BooleanUtils.isTrue(record.isLocalLocator()), Flags.LOCAL_LOCATOR) | //
-                ByteUtil.boolToBit(BooleanUtils.isTrue(record.isRlocProbed()), Flags.RLOC_PROBED) | //
+        replyBuffer.put((byte) (ByteUtil.boolToBit(BooleanUtils.isTrue(record.isLocalLocator()), Flags.LOCAL_LOCATOR) |
+                ByteUtil.boolToBit(BooleanUtils.isTrue(record.isRlocProbed()), Flags.RLOC_PROBED) |
                 ByteUtil.boolToBit(BooleanUtils.isTrue(record.isRouted()), Flags.ROUTED)));
         LispAddressSerializer.getInstance().serialize(replyBuffer, record.getRloc());
     }
index 2d4c2de294d9eaebe5e370fb12b637d827a7f3b8..901ccde594177bbeb2c05874e747dc3d9ae4c204 100644 (file)
@@ -133,7 +133,8 @@ public final class MapNotifySerializer {
             notifyBuffer.limit(notifyBuffer.position());
             return builder.build();
         } catch (RuntimeException re) {
-            throw new LispSerializationException("Couldn't deserialize Map-Notify (len=" + notifyBuffer.capacity() + ")", re);
+            throw new LispSerializationException("Couldn't deserialize Map-Notify (len="
+                    + notifyBuffer.capacity() + ")", re);
         }
     }
 
index a16a501b430b5a55f0972a0d61b57b1002bb19bd..38beabcf9e6afc90ee5866af26cf2cd7a738952c 100644 (file)
@@ -141,7 +141,8 @@ public final class MapRegisterSerializer {
             registerBuffer.get(mapRegisterBytes);
             return builder.build();
         } catch (RuntimeException re) {
-            throw new LispSerializationException("Couldn't deserialize Map-Register (len=" + registerBuffer.capacity() + ")", re);
+            throw new LispSerializationException("Couldn't deserialize Map-Register (len="
+                    + registerBuffer.capacity() + ")", re);
         }
 
     }
index 9d2483199c502396a9b74b2b15a822e69e521be2..7c26d7fb98fb6f63e40cf92c322818b93ca12af2 100644 (file)
@@ -67,8 +67,8 @@ public final class MapRequestSerializer {
                 | ByteUtil.boolToBit(BooleanUtils.isTrue(mapRequest.isMapDataPresent()), Flags.MAP_DATA_PRESENT)
                 | ByteUtil.boolToBit(BooleanUtils.isTrue(mapRequest.isProbe()), Flags.PROBE) | ByteUtil.boolToBit(
                 BooleanUtils.isTrue(mapRequest.isSmr()), Flags.SMR)));
-        requestBuffer.put((byte) (ByteUtil.boolToBit(BooleanUtils.isTrue(mapRequest.isPitr()), Flags.PITR) | ByteUtil.boolToBit(
-                BooleanUtils.isTrue(mapRequest.isSmrInvoked()), Flags.SMR_INVOKED)));
+        requestBuffer.put((byte) (ByteUtil.boolToBit(BooleanUtils.isTrue(mapRequest.isPitr()), Flags.PITR)
+                | ByteUtil.boolToBit(BooleanUtils.isTrue(mapRequest.isSmrInvoked()), Flags.SMR_INVOKED)));
         if (mapRequest.getItrRloc() != null) {
             int IRC = mapRequest.getItrRloc().size();
             if (IRC > 0) {
@@ -154,7 +154,8 @@ public final class MapRequestSerializer {
             }
             if (builder.isMapDataPresent() && requestBuffer.hasRemaining()) {
                 try {
-                    builder.setMapReply(new org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.maprequest.MapReplyBuilder().setMappingRecord(
+                    builder.setMapReply(new org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105
+                            .maprequest.MapReplyBuilder().setMappingRecord(
                             MappingRecordSerializer.getInstance().deserialize(requestBuffer)).build()).build();
                 } catch (RuntimeException re) {
                     LOG.warn("Couldn't deserialize Map-Reply encapsulated in Map-Request", re);
@@ -162,7 +163,8 @@ public final class MapRequestSerializer {
             }
             return builder.build();
         } catch (RuntimeException re) {
-            throw new LispSerializationException("Couldn't deserialize Map-Request (len=" + requestBuffer.capacity() + ")", re);
+            throw new LispSerializationException("Couldn't deserialize Map-Request (len="
+                    + requestBuffer.capacity() + ")", re);
         }
     }
 
index 51bdf06371bea93919e41467c66fda7d5414c1d3..c281110b3978add790c2802b03d27e9c52c388fe 100644 (file)
@@ -44,8 +44,8 @@ public final class AfiListSerializer extends LcafSerializer {
     @Override
     protected short getLcafLength(LispAddress lispAddress) {
         short totalSize = 0;
-        AfiList afiList = (((org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.AfiList)
-                lispAddress.getAddress()).getAfiList());
+        AfiList afiList = (((org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.AfiList) lispAddress.getAddress()).getAfiList());
         for (SimpleAddress address : afiList.getAddressList()) {
             totalSize += SimpleAddressSerializer.getInstance().getAddressSize(address);
         }
@@ -59,8 +59,8 @@ public final class AfiListSerializer extends LcafSerializer {
 
     @Override
     protected void serializeData(ByteBuffer buffer, LispAddress lispAddress) {
-        AfiList afiList = (((org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.AfiList)
-                lispAddress.getAddress()).getAfiList());
+        AfiList afiList = (((org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.AfiList) lispAddress.getAddress()).getAfiList());
         for (SimpleAddress address : afiList.getAddressList()) {
             SimpleAddressSerializer.getInstance().serialize(buffer, address);
         }
@@ -92,7 +92,8 @@ public final class AfiListSerializer extends LcafSerializer {
             length -= SimpleAddressSerializer.getInstance().getAddressSize(address);
             addresses.add(address);
         }
-        return new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.AfiListBuilder()
-                .setAfiList(new AfiListBuilder().setAddressList(addresses).build()).build();
+        return new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp
+                .address.address.AfiListBuilder().setAfiList(new AfiListBuilder().setAddressList(addresses).build())
+                .build();
     }
 }
index 7c0f40175c11d1a1c16470a513330884b6b806c6..c1e6d302a0a8294d6df5afad0dd2562bce9b8779 100644 (file)
@@ -44,8 +44,8 @@ public final class ApplicationDataSerializer extends LcafSerializer {
 
     @Override
     protected short getLcafLength(LispAddress lispAddress) {
-        ApplicationData appData = ((org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.ApplicationData)
-                lispAddress.getAddress()).getApplicationData();
+        ApplicationData appData = ((org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types
+                .rev151105.lisp.address.address.ApplicationData) lispAddress.getAddress()).getApplicationData();
         return (short) (Length.ALL_FIELDS + SimpleAddressSerializer.getInstance().getAddressSize(appData.getAddress()));
     }
 
@@ -56,8 +56,8 @@ public final class ApplicationDataSerializer extends LcafSerializer {
 
     @Override
     protected void serializeData(ByteBuffer buffer, LispAddress lispAddress) {
-        ApplicationData appData = ((org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.ApplicationData)
-                lispAddress.getAddress()).getApplicationData();
+        ApplicationData appData = ((org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types
+                .rev151105.lisp.address.address.ApplicationData) lispAddress.getAddress()).getApplicationData();
         buffer.put(ByteUtil.partialIntToByteArray(NumberUtil.asInt(appData.getIpTos()), Length.TOC));
         buffer.put((byte) NumberUtil.asShort(appData.getProtocol()));
         if (appData.getLocalPortLow() != null) {
@@ -93,7 +93,8 @@ public final class ApplicationDataSerializer extends LcafSerializer {
     }
 
     @Override
-    protected Rloc deserializeLcafRlocData(ByteBuffer buffer, byte res2, short length, LispAddressSerializerContext ctx) {
+    protected Rloc deserializeLcafRlocData(ByteBuffer buffer, byte res2, short length,
+            LispAddressSerializerContext ctx) {
         RlocBuilder eb = new RlocBuilder();
         eb.setAddressType(ApplicationDataLcaf.class);
         eb.setVirtualNetworkId(null);
@@ -113,8 +114,8 @@ public final class ApplicationDataSerializer extends LcafSerializer {
         builder.setRemotePortHigh(new PortNumber(ByteUtil.asUnsignedShort(buffer.getShort())));
         SimpleAddress address = SimpleAddressSerializer.getInstance().deserialize(buffer, ctx);
         builder.setAddress(address);
-        return new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.ApplicationDataBuilder()
-                .setApplicationData(builder.build()).build();
+        return new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.ApplicationDataBuilder().setApplicationData(builder.build()).build();
     }
 
     private interface Length {
index 0daeb6c72206068c766e14b1539bd4ee957e71ac..101ad52d33065ecbf5ba59b2c43ed7b664fe1010 100644 (file)
@@ -70,8 +70,9 @@ public final class ExplicitLocatorPathSerializer extends LcafSerializer {
             for (Hop hop : elp.getExplicitLocatorPath().getHop()) {
                 buffer.put((byte) 0);
                 if (hop.getLrsBits() != null) {
-                    buffer.put((byte) (ByteUtil.boolToBit(BooleanUtils.isTrue(hop.getLrsBits().isLookup()), Flags.LOOKUP) | //
-                            ByteUtil.boolToBit(BooleanUtils.isTrue(hop.getLrsBits().isRlocProbe()), Flags.RLOC_PROBE) | //
+                    buffer.put((byte) (
+                            ByteUtil.boolToBit(BooleanUtils.isTrue(hop.getLrsBits().isLookup()), Flags.LOOKUP) |
+                            ByteUtil.boolToBit(BooleanUtils.isTrue(hop.getLrsBits().isRlocProbe()), Flags.RLOC_PROBE) |
                             ByteUtil.boolToBit(BooleanUtils.isTrue(hop.getLrsBits().isStrict()), Flags.STRICT)));
                 } else {
                     buffer.put((byte) 0);
@@ -91,7 +92,8 @@ public final class ExplicitLocatorPathSerializer extends LcafSerializer {
     }
 
     @Override
-    protected Rloc deserializeLcafRlocData(ByteBuffer buffer, byte res2, short length, LispAddressSerializerContext ctx) {
+    protected Rloc deserializeLcafRlocData(ByteBuffer buffer, byte res2, short length,
+            LispAddressSerializerContext ctx) {
         RlocBuilder rb = new RlocBuilder();
         rb.setAddressType(ExplicitLocatorPathLcaf.class);
         rb.setVirtualNetworkId(null);
@@ -115,7 +117,8 @@ public final class ExplicitLocatorPathSerializer extends LcafSerializer {
             length -= SimpleAddressSerializer.getInstance().getAddressSize(address) + 2;
             hops.add(builder.build());
         }
-        return new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.ExplicitLocatorPathBuilder()
+        return new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.ExplicitLocatorPathBuilder()
                 .setExplicitLocatorPath(new ExplicitLocatorPathBuilder().setHop(hops).build()).build();
     }
 
index d8a6c292305edb671fa67276df100355bbf9f241..1056ca7bd6f0d819b9b8d951849a7e5c5bae3d63 100644 (file)
@@ -68,7 +68,8 @@ public final class KeyValueAddressSerializer extends LcafSerializer {
     }
 
     @Override
-    protected Rloc deserializeLcafRlocData(ByteBuffer buffer, byte res2, short length, LispAddressSerializerContext ctx) {
+    protected Rloc deserializeLcafRlocData(ByteBuffer buffer, byte res2, short length,
+            LispAddressSerializerContext ctx) {
         RlocBuilder rb = new RlocBuilder();
         rb.setAddressType(KeyValueAddressLcaf.class);
         rb.setVirtualNetworkId(null);
@@ -82,7 +83,7 @@ public final class KeyValueAddressSerializer extends LcafSerializer {
         KeyValueAddressBuilder kvab = new KeyValueAddressBuilder();
         kvab.setKey(keyAddress);
         kvab.setValue(valueAddress);
-        return new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.KeyValueAddressBuilder()
-                .setKeyValueAddress(kvab.build()).build();
+        return new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.KeyValueAddressBuilder().setKeyValueAddress(kvab.build()).build();
     }
 }
index 3b48efae87e0c675eabcaeedce090d7ac48f0753..07b13290ff53ead259fc9a43273e178dd819c20d 100644 (file)
@@ -76,8 +76,8 @@ public class ServicePathSerializer extends LcafSerializer {
         buffer.get(spi);
         spb.setServicePathId(new ServicePathIdType((long) ByteUtil.getPartialInt(spi)));
         spb.setServiceIndex((short) ByteUtil.getUnsignedByte(buffer));
-        return new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.ServicePathBuilder()
-                .setServicePath(spb.build()).build();
+        return new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.ServicePathBuilder().setServicePath(spb.build()).build();
     }
 
     private interface Length {
index 00309cea1252aa28dff40cfbd4b336cb5af07afd..2bf62f22ab176ca7166d9ef0e77faa93515e4684 100644 (file)
@@ -45,8 +45,10 @@ public final class SourceDestKeySerializer extends LcafSerializer {
     protected short getLcafLength(LispAddress lispAddress) {
         SourceDestKey sdk = (SourceDestKey) lispAddress.getAddress();
         return (short) (Length.ALL_FIELDS
-                + SimpleAddressSerializer.getInstance().getAddressSize(new SimpleAddress(sdk.getSourceDestKey().getSource()))
-                + SimpleAddressSerializer.getInstance().getAddressSize(new SimpleAddress(sdk.getSourceDestKey().getDest())));
+                + SimpleAddressSerializer.getInstance().getAddressSize(
+                        new SimpleAddress(sdk.getSourceDestKey().getSource()))
+                + SimpleAddressSerializer.getInstance().getAddressSize(
+                        new SimpleAddress(sdk.getSourceDestKey().getDest())));
     }
 
     @Override
@@ -85,7 +87,8 @@ public final class SourceDestKeySerializer extends LcafSerializer {
     }
 
     @Override
-    protected Rloc deserializeLcafRlocData(ByteBuffer buffer, byte res2, short length, LispAddressSerializerContext ctx) {
+    protected Rloc deserializeLcafRlocData(ByteBuffer buffer, byte res2, short length,
+            LispAddressSerializerContext ctx) {
         RlocBuilder rb = new RlocBuilder();
         rb.setAddressType(SourceDestKeyLcaf.class);
         rb.setVirtualNetworkId(null);
@@ -104,8 +107,8 @@ public final class SourceDestKeySerializer extends LcafSerializer {
         SourceDestKeyBuilder sdb = new SourceDestKeyBuilder();
         sdb.setSource(srcAddress);
         sdb.setDest(dstAddress);
-        return new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.SourceDestKeyBuilder()
-                .setSourceDestKey(sdb.build()).build();
+        return new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.SourceDestKeyBuilder().setSourceDestKey(sdb.build()).build();
     }
 
     private interface Length {
index 24b18167611b1756d962073bb7a2c0d62c96aa99..5f4fbff4058c9cebce8c38a3079dd41bea54484d 100644 (file)
@@ -75,7 +75,8 @@ public final class LispAddressUtil {
 
     public static final short STARTING_SERVICE_INDEX = 255;
     private static final Pattern IP4_PATTERN =
-            Pattern.compile("(([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.){3}([01]?\\d\\d?|2[0-4]\\d|25[0-5])", Pattern.CASE_INSENSITIVE);
+            Pattern.compile("(([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.){3}([01]?\\d\\d?|2[0-4]\\d|25[0-5])",
+            Pattern.CASE_INSENSITIVE);
     private static final Pattern IP6_PATTERN =
             Pattern.compile("([0-9a-f]{1,4}:){7}([0-9a-f]){1,4}", Pattern.CASE_INSENSITIVE);
 
@@ -124,11 +125,13 @@ public final class LispAddressUtil {
 
     public static Address addressFromInet(InetAddress address) {
         if (address instanceof Inet4Address) {
-            return (Address) new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.Ipv4Builder()
-            .setIpv4(IetfInetUtil.INSTANCE.ipv4AddressFor(address)).build();
+            return (Address) new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types
+                    .rev151105.lisp.address.address.Ipv4Builder()
+                    .setIpv4(IetfInetUtil.INSTANCE.ipv4AddressFor(address)).build();
         } else if (address instanceof Inet6Address) {
-            return (Address) new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.Ipv6Builder()
-            .setIpv6(IetfInetUtil.INSTANCE.ipv6AddressFor(address)).build();
+            return (Address) new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types
+                    .rev151105.lisp.address.address.Ipv6Builder()
+                    .setIpv6(IetfInetUtil.INSTANCE.ipv6AddressFor(address)).build();
         }
         return null;
     }
@@ -148,9 +151,11 @@ public final class LispAddressUtil {
         if (address == null) {
             return null;
         } else if (address.getIpv4Address() != null) {
-            return (Address) new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.Ipv4Builder().setIpv4(address.getIpv4Address()).build();
+            return (Address) new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types
+                    .rev151105.lisp.address.address.Ipv4Builder().setIpv4(address.getIpv4Address()).build();
         } else if (address.getIpv6Address() != null) {
-            return (Address) new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.Ipv6Builder().setIpv6(address.getIpv6Address()).build();
+            return (Address) new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types
+                    .rev151105.lisp.address.address.Ipv6Builder().setIpv6(address.getIpv6Address()).build();
         }
         return null;
     }
@@ -170,9 +175,11 @@ public final class LispAddressUtil {
         if (address == null) {
             return null;
         } else if (address.getIpv4Prefix() != null) {
-            return (Address) new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.Ipv4PrefixBuilder().setIpv4Prefix(address.getIpv4Prefix()).build();
+            return (Address) new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types
+                    .rev151105.lisp.address.address.Ipv4PrefixBuilder().setIpv4Prefix(address.getIpv4Prefix()).build();
         } else if (address.getIpv6Prefix() != null) {
-            return (Address) new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.Ipv6PrefixBuilder().setIpv6Prefix(address.getIpv6Prefix()).build();
+            return (Address) new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types
+                    .rev151105.lisp.address.address.Ipv6PrefixBuilder().setIpv6Prefix(address.getIpv6Prefix()).build();
         }
         return null;
     }
@@ -370,7 +377,8 @@ public final class LispAddressUtil {
         EidBuilder builder = new EidBuilder();
         builder.setAddressType(eid.getAddressType());
         builder.setVirtualNetworkId(eid.getVirtualNetworkId());
-        builder.setAddress(new Ipv4PrefixBuilder().setIpv4Prefix(IetfInetUtil.INSTANCE.ipv4PrefixFor(address, mask)).build());
+        builder.setAddress(new Ipv4PrefixBuilder().setIpv4Prefix(
+                IetfInetUtil.INSTANCE.ipv4PrefixFor(address, mask)).build());
         return builder.build();
     }
 
@@ -378,7 +386,8 @@ public final class LispAddressUtil {
         EidBuilder builder = new EidBuilder();
         builder.setAddressType(eid.getAddressType());
         builder.setVirtualNetworkId(eid.getVirtualNetworkId());
-        builder.setAddress(new Ipv6PrefixBuilder().setIpv6Prefix(IetfInetUtil.INSTANCE.ipv6PrefixFor(address, mask)).build());
+        builder.setAddress(new Ipv6PrefixBuilder().setIpv6Prefix(
+                IetfInetUtil.INSTANCE.ipv6PrefixFor(address, mask)).build());
         return builder.build();
     }
 
@@ -388,7 +397,10 @@ public final class LispAddressUtil {
         if (vni >= 0) {
             eb.setVirtualNetworkId(new InstanceIdType(vni));
         }
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.service.path.ServicePathBuilder spb = new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.service.path.ServicePathBuilder();
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.service.path.ServicePathBuilder spb =
+                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.service.path.ServicePathBuilder();
         spb.setServicePathId(new ServicePathIdType(servicePathId));
         spb.setServiceIndex(serviceIndex);
         return eb.setAddress(addressFromServicePath(spb.build())).build();
@@ -430,7 +442,8 @@ public final class LispAddressUtil {
         KeyValueAddressBuilder kvab = new KeyValueAddressBuilder();
         kvab.setKey(key);
         kvab.setValue(value);
-        KeyValueAddress address = new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.KeyValueAddressBuilder()
+        KeyValueAddress address = new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types
+                .rev151105.lisp.address.address.KeyValueAddressBuilder()
                 .setKeyValueAddress(kvab.build()).build();
         EidBuilder builder = new EidBuilder();
         builder.setAddressType(KeyValueAddressLcaf.class);
@@ -443,7 +456,8 @@ public final class LispAddressUtil {
         KeyValueAddressBuilder kvab = new KeyValueAddressBuilder();
         kvab.setKey(key);
         kvab.setValue(value);
-        KeyValueAddress address = new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.KeyValueAddressBuilder()
+        KeyValueAddress address = new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types
+                .rev151105.lisp.address.address.KeyValueAddressBuilder()
                 .setKeyValueAddress(kvab.build()).build();
         RlocBuilder builder = new RlocBuilder();
         builder.setAddressType(KeyValueAddressLcaf.class);
@@ -468,7 +482,8 @@ public final class LispAddressUtil {
         builder.setAddressType(SourceDestKeyLcaf.class);
         builder.setVirtualNetworkId(new InstanceIdType(Long.valueOf(vni)));
         builder.setAddress(
-                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.SourceDestKeyBuilder()
+                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                        .lisp.address.address.SourceDestKeyBuilder()
                         .setSourceDestKey(asSrcDst(src, dst, smask, dmask)).build());
 
         return builder.build();
@@ -485,8 +500,10 @@ public final class LispAddressUtil {
 
     public static Rloc asTeLcafRloc(List<IpAddress> hopList) {
         RlocBuilder teBuilder = new RlocBuilder();
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.ExplicitLocatorPathBuilder elpBuilder =
-                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.ExplicitLocatorPathBuilder();
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.ExplicitLocatorPathBuilder elpBuilder =
+                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.ExplicitLocatorPathBuilder();
         ExplicitLocatorPathBuilder teAddrBuilder = new ExplicitLocatorPathBuilder();
         teAddrBuilder.setHop(new ArrayList<Hop>());
         for (IpAddress hop : hopList) {
index 70aa85be2f1532758d643b079d1a87d6fc6af7b8..8614c83575f0c0f6c4bfb28cb8dd0dffcf0625a6 100644 (file)
@@ -149,7 +149,8 @@ public class LispAddressUtilTest {
      */
     @Test
     public void addressFromSimpleAddressTest_asIpPrefix() {
-        final SimpleAddress simpleAddress = new SimpleAddress(new IpPrefix(new Ipv4Prefix(IPV4_ADDRESS_PREFIX_VALUE_TEST)));
+        final SimpleAddress simpleAddress = new SimpleAddress(new IpPrefix(new Ipv4Prefix(
+                IPV4_ADDRESS_PREFIX_VALUE_TEST)));
         final Class<? extends LispAddressFamily> addressClass = LispAddressUtil.addressTypeFromSimpleAddress
                 (simpleAddress);
         assertEquals(Ipv4PrefixAfi.class, addressClass);
@@ -304,8 +305,8 @@ public class LispAddressUtilTest {
         final Address address = LispAddressUtil.addressFromIpPrefix(ipv4Prefix);
         assertTrue(address instanceof org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.
                 types.rev151105.lisp.address.address.Ipv4Prefix);
-        assertEquals(IPV4_ADDRESS_PREFIX_VALUE_TEST, ((org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.
-                address.types.rev151105.lisp.address.address.Ipv4Prefix) address).getIpv4Prefix().getValue());
+        assertEquals(IPV4_ADDRESS_PREFIX_VALUE_TEST, ((org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.
+                lisp.address.types.rev151105.lisp.address.address.Ipv4Prefix) address).getIpv4Prefix().getValue());
     }
 
     /**
@@ -395,7 +396,8 @@ public class LispAddressUtilTest {
      */
     @Test
     public void addressFromDistinguishedNameTest_withDistinguishedName() {
-        final DistinguishedNameType distinguishedNameType = new DistinguishedNameType(DISTINGUISHED_NAME_TYPE_VALUE_TEST);
+        final DistinguishedNameType distinguishedNameType = new DistinguishedNameType(
+                DISTINGUISHED_NAME_TYPE_VALUE_TEST);
         final Address testedAddress = LispAddressUtil.addressFromDistinguishedName(distinguishedNameType);
 
         assertTrue(testedAddress instanceof DistinguishedName);
@@ -755,16 +757,17 @@ public class LispAddressUtilTest {
      */
     @Test
     public void asKeyValueAddress() {
-        final Rloc rloc = LispAddressUtil.asKeyValueAddress(SIMPLE_ADDRESS_DISTINGUISHED_VALUE_TEST, SIMPLE_ADDRESS_B_TEST);
+        final Rloc rloc = LispAddressUtil.asKeyValueAddress(SIMPLE_ADDRESS_DISTINGUISHED_VALUE_TEST,
+                SIMPLE_ADDRESS_B_TEST);
         verifyKeyValueAddress(rloc, SIMPLE_ADDRESS_DISTINGUISHED_TEST);
     }
 
     private void verifyKeyValueAddress(final LispAddress lispAddress, final SimpleAddress keyValue) {
         assertEquals(KeyValueAddressLcaf.class, lispAddress.getAddressType());
         assertNull(lispAddress.getVirtualNetworkId());
-        final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address
-                .address.key.value.address.KeyValueAddress keyValueAddress = ((KeyValueAddress) lispAddress.getAddress()).
-                getKeyValueAddress();
+        final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.key.value.address.KeyValueAddress keyValueAddress =
+                ((KeyValueAddress) lispAddress.getAddress()).getKeyValueAddress();
         assertNotNull(keyValueAddress);
         assertEquals(keyValue, keyValueAddress.getKey());
         assertEquals(SIMPLE_ADDRESS_B_TEST, keyValueAddress.getValue());
@@ -822,7 +825,8 @@ public class LispAddressUtilTest {
      */
     @Test
     public void asTeLcafRloc() {
-        final List<IpAddress> ipAddresses = Arrays.asList(IP_ADDRESS_OBJECT_WITH_IPV4_TEST, IP_ADDRESS_OBJECT_WITH_IPV6_TEST);
+        final List<IpAddress> ipAddresses = Arrays.asList(IP_ADDRESS_OBJECT_WITH_IPV4_TEST,
+                IP_ADDRESS_OBJECT_WITH_IPV6_TEST);
         final Rloc rloc = LispAddressUtil.asTeLcafRloc(ipAddresses);
         assertNotNull(rloc);
         assertEquals(ExplicitLocatorPathLcaf.class, rloc.getAddressType());
@@ -994,7 +998,8 @@ public class LispAddressUtilTest {
     @Ignore /* remove when https://git.opendaylight.org/gerrit/#/c/35681/2 will be merged */
     @Test
     public void toIpPrefixEid() throws UnknownHostException {
-        final Eid eid = LispAddressUtil.toIpPrefixEid(IP_ADDRESS_OBJECT_WITH_IPV4_TEST, INSTANCE_ID_TYPE_VALUE_SHORT_TEST);
+        final Eid eid = LispAddressUtil.toIpPrefixEid(IP_ADDRESS_OBJECT_WITH_IPV4_TEST,
+                INSTANCE_ID_TYPE_VALUE_SHORT_TEST);
         verifyEidContainsIpPrefix(eid, MASK_OK_DEFAULT_IPV4_TEST);
     }
 
index 2b17bf952ee4feb26c209ef0126fda2d5f270b10..f2ec8ef025ee439146d5f4ef9f59431982775fa2 100644 (file)
@@ -48,9 +48,9 @@ public class MapNotifySerializationTest extends BaseTestCase {
 
         mnBuilder.setNonce(6161616161L);
         mnBuilder.setKeyId((short) 0x0001);
-        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 };
         mnBuilder.setAuthenticationData(authenticationData);
 
         ByteBuffer bb = MapNotifySerializer.getInstance().serialize(mnBuilder.build());
@@ -89,16 +89,15 @@ public class MapNotifySerializationTest extends BaseTestCase {
 
         mnBuilder.setNonce(6161616161L);
         mnBuilder.setKeyId((short) 0x0001);
-        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 };
         mnBuilder.setAuthenticationData(authenticationData);
 
         MapNotify mn = mnBuilder.build();
-        ArrayAssert.assertEquals(
-                MapNotifySerializer.getInstance().serialize(mn).array(),
-                MapNotifySerializer.getInstance()
-                        .serialize(MapNotifySerializer.getInstance().deserialize(MapNotifySerializer.getInstance().serialize(mn))).array());
+        ArrayAssert.assertEquals(MapNotifySerializer.getInstance().serialize(mn).array(),
+                MapNotifySerializer.getInstance().serialize(MapNotifySerializer.getInstance()
+                        .deserialize(MapNotifySerializer.getInstance().serialize(mn))).array());
 
     }
 
@@ -116,9 +115,8 @@ public class MapNotifySerializationTest extends BaseTestCase {
         // xTR-ID 1
         // Site-ID 1
         MapNotify mn = MapNotifySerializer.getInstance().deserialize(hexToByteBuffer("48 00 00 01 FF BB "
-        //
-                + "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 " //
+                + "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 "
                 + "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 " // xTR-ID
                 + "00 00 00 00 00 00 00 01 " // Site-ID
@@ -195,10 +193,9 @@ public class MapNotifySerializationTest extends BaseTestCase {
         // 192.168.136.13
         //
         MapNotify mn = MapNotifySerializer.getInstance().deserialize(hexToByteBuffer("40 00 00 "
-        //
                 + "04 " // Record count
-                + "FF BB 00 00 00 00 00 00 00 01 00 14 87 c1 33 cd " //
-                + "d1 1e bc 80 fd 3e 71 11 81 17 40 74 26 25 44 bd " //
+                + "FF BB 00 00 00 00 00 00 00 01 00 14 87 c1 33 cd "
+                + "d1 1e bc 80 fd 3e 71 11 81 17 40 74 26 25 44 bd "
                 + "00 00 00 0a 01 20 10 00 00 00 00 01 99 10 fe 01 01 64 " // Record
                 // 1
                 + "ff 00 00 05 00 01 c0 a8 88 0a " // contd
@@ -227,10 +224,9 @@ public class MapNotifySerializationTest extends BaseTestCase {
     @Test
     public void deserialize__Locators() throws Exception {
         MapNotify mn = MapNotifySerializer.getInstance().deserialize(hexToByteBuffer("40 00 01 01 "
-        //
-                + "FF BB 00 00 00 00 00 00 00 01 00 14 f1 b8 ab f0 " //
-                + "66 bb 2e ef 12 70 74 46 6f 6b 8e ca bf 1e 68 40 " //
-                + "00 00 00 0a " //
+                + "FF BB 00 00 00 00 00 00 00 01 00 14 f1 b8 ab f0 "
+                + "66 bb 2e ef 12 70 74 46 6f 6b 8e ca bf 1e 68 40 "
+                + "00 00 00 0a "
                 + "03 " // Locator Count
                 + "20 10 00 00 00 00 01 99 10 fe 01 "
                 // Locator 1
@@ -345,10 +341,9 @@ public class MapNotifySerializationTest extends BaseTestCase {
     @Test
     public void deserialize__IllegalAction() throws Exception {
         MapNotify mn = MapNotifySerializer.getInstance().deserialize(hexToByteBuffer("40 00 01 01 FF BB "
-        //
-                + "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 " //
+                + "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"));
 
         assertEquals(1, mn.getMappingRecordItem().size());
@@ -369,10 +364,9 @@ public class MapNotifySerializationTest extends BaseTestCase {
         // Priority/Weight: 1/100, Multicast Priority/Weight: 255/0
         //
         MapNotifySerializer.getInstance().deserialize(hexToByteBuffer("48 00 00 01 FF BB "
-        //
-                + "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 " //
+                + "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"));
     }
 
@@ -390,10 +384,9 @@ public class MapNotifySerializationTest extends BaseTestCase {
         // Priority/Weight: 1/100, Multicast Priority/Weight: 255/0
         //
         MapNotify mn = MapNotifySerializer.getInstance().deserialize(hexToByteBuffer("40 00 00 01 FF BB "
-        //
-                + "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 " //
+                + "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"));
 
         assertFalse(mn.isXtrSiteIdPresent());
@@ -401,9 +394,9 @@ public class MapNotifySerializationTest extends BaseTestCase {
         assertEquals(1, mn.getMappingRecordItem().size());
         assertEquals(0xFFBB000000000000L, mn.getNonce().longValue());
         assertEquals(0x0001, mn.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 };
+        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());
     }
 
@@ -422,11 +415,9 @@ public class MapNotifySerializationTest extends BaseTestCase {
         // Priority/Weight: 1/100, Multicast Priority/Weight: 255/0
         //
         MapNotify mn = MapNotifySerializer.getInstance().deserialize(hexToByteBuffer("40 00 00 01 FF BB "
-        //
                 + "00 00 00 00 00 00 00 02 00 20 70 30 d4 c6 10 44 0d 83 be 4d bf fd a9 8c 57 6d 68 a5 bf 32 "
-                //
-                + "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 " //
+                + "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"));
 
         assertFalse(mn.isXtrSiteIdPresent());
@@ -434,10 +425,11 @@ public class MapNotifySerializationTest extends BaseTestCase {
         assertEquals(1, mn.getMappingRecordItem().size());
         assertEquals(0xFFBB000000000000L, mn.getNonce().longValue());
         assertEquals(0x0002, mn.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 };
+        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, mn.getAuthenticationData());
     }
 }
index d3d03d8948e92b8983fbfa78bdd8a3f711704ae4..eb7500d03cc3116c6b708dc008d11494410a350f 100644 (file)
@@ -69,7 +69,6 @@ public class MapReplySerializationTest extends BaseTestCase {
     public void deserialize__SomeFlags() throws Exception {
 
         MapReply mr = MapReplySerializer.getInstance().deserialize(hexToByteBuffer("2A 00 00 00 00 00 "
-        //
                 + "00 00 00 00 00 00"));
         assertEquals(true, mr.isProbe());
         assertEquals(false, mr.isEchoNonceEnabled());
@@ -79,13 +78,12 @@ public class MapReplySerializationTest extends BaseTestCase {
     @Test
     public void deserialize__All() throws Exception {
         MapReply mr = MapReplySerializer.getInstance().deserialize(hexToByteBuffer("20 00 00 02 00 00 "
-        //
-                + "00 00 00 00 00 02 00 00 " //
-                + "00 02 02 20 00 00 00 00 " //
-                + "00 01 01 02 03 04 01 02 " //
-                + "03 04 00 06 00 01 0a 0a " //
-                + "0a 0a 04 03 02 01 00 01 " //
-                + "00 02 00 01 00 02 00 03 " //
+                + "00 00 00 00 00 02 00 00 "
+                + "00 02 02 20 00 00 00 00 "
+                + "00 01 01 02 03 04 01 02 "
+                + "03 04 00 06 00 01 0a 0a "
+                + "0a 0a 04 03 02 01 00 01 "
+                + "00 02 00 01 00 02 00 03 "
                 + "00 04 00 05 00 06 00 07 00 08 00 00 00 00 00 10 30 00 00 02 00 01 04 03 00 00"));
         assertEquals(2, mr.getNonce().longValue());
         assertEquals("1.2.3.4/32", ((Ipv4Prefix) mr.getMappingRecordItem().get(0)
@@ -107,19 +105,32 @@ public class MapReplySerializationTest extends BaseTestCase {
                 .getLocatorRecord().get(1).getRloc().getAddress()).getIpv6().getValue());
         assertEquals("10.10.10.10", ((Ipv4) mr.getMappingRecordItem().get(0).getMappingRecord()
                 .getLocatorRecord().get(0).getRloc().getAddress()).getIpv4().getValue());
-        assertEquals(1, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0).getPriority().byteValue());
-        assertEquals(2, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0).getWeight().byteValue());
-        assertEquals(3, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0).getMulticastPriority().byteValue());
-        assertEquals(4, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0).getMulticastWeight().byteValue());
-        assertEquals(4, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(1).getPriority().byteValue());
-        assertEquals(3, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(1).getWeight().byteValue());
-        assertEquals(2, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(1).getMulticastPriority().byteValue());
-        assertEquals(1, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(1).getMulticastWeight().byteValue());
-        assertEquals(true, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0).isLocalLocator());
-        assertEquals(true, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0).isRlocProbed());
-        assertEquals(false, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0).isRouted());
-        assertEquals(false, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(1).isLocalLocator());
-        assertEquals(false, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(1).isRlocProbed());
+        assertEquals(1, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0)
+                .getPriority().byteValue());
+        assertEquals(2, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0)
+                .getWeight().byteValue());
+        assertEquals(3, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0)
+                .getMulticastPriority().byteValue());
+        assertEquals(4, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0)
+                .getMulticastWeight().byteValue());
+        assertEquals(4, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(1)
+                .getPriority().byteValue());
+        assertEquals(3, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(1)
+                .getWeight().byteValue());
+        assertEquals(2, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(1)
+                .getMulticastPriority().byteValue());
+        assertEquals(1, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(1)
+                .getMulticastWeight().byteValue());
+        assertEquals(true, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0)
+                .isLocalLocator());
+        assertEquals(true, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0)
+                .isRlocProbed());
+        assertEquals(false, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(0)
+                .isRouted());
+        assertEquals(false, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(1)
+                .isLocalLocator());
+        assertEquals(false, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(1)
+                .isRlocProbed());
         assertEquals(true, mr.getMappingRecordItem().get(0).getMappingRecord().getLocatorRecord().get(1).isRouted());
     }
 
@@ -140,7 +151,8 @@ public class MapReplySerializationTest extends BaseTestCase {
         assertEquals(2, packet.get(3));
 
         packet.position(24); // EID in first record
-        byte[] expected = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 };
+        byte[] expected = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                0x08 };
         byte[] actual = new byte[16];
         packet.get(actual);
         ArrayAssert.assertEquals(expected, actual);
@@ -152,8 +164,8 @@ public class MapReplySerializationTest extends BaseTestCase {
     @Test
     public void deserialize__MultipleRecordsWithoutRLOCs() throws Exception {
         MapReply mr = MapReplySerializer.getInstance().deserialize(hexToByteBuffer("20 00 00 02 00 00 "
-        //
-                + "00 00 00 00 00 00 00 00 00 01 00 20 00 00 00 00 00 01 01 02 03 04 00 00 00 00 00 10 30 00 00 02 00 01 04 03 00 00"));
+                + "00 00 00 00 00 00 00 00 00 01 00 20 00 00 00 00 "
+                + "00 01 01 02 03 04 00 00 00 00 00 10 30 00 00 02 00 01 04 03 00 00"));
         assertEquals("1.2.3.4/32", ((Ipv4Prefix) mr.getMappingRecordItem().get(0)
                 .getMappingRecord().getEid().getAddress()).getIpv4Prefix().getValue());
         // XXX Why here normalized and other cases not normalized?
index 0d4266405959db321c6c9ddd4dc3c77e90084b51..8ff9099843f3198ebae9ebee45012a17b6e3762a 100644 (file)
@@ -55,8 +55,7 @@ public class MapRequestSerializationTest extends BaseTestCase {
     @Test
     public void deserialize__FlagsInFirstByte() throws Exception {
         MapRequest mr = MapRequestSerializer.getInstance().deserialize(hexToByteBuffer("16 00 00 01 3d 8d "
-        //
-                + "2a cd 39 c8 d6 08 00 00 00 01 c0 a8 88 0a 00 20 " //
+                + "2a cd 39 c8 d6 08 00 00 00 01 c0 a8 88 0a 00 20 "
                 + "00 01 01 02 03 04"));
         assertFalse(mr.isAuthoritative());
         assertTrue(mr.isMapDataPresent());
@@ -64,8 +63,7 @@ public class MapRequestSerializationTest extends BaseTestCase {
         assertFalse(mr.isSmr());
 
         mr = MapRequestSerializer.getInstance().deserialize(hexToByteBuffer("19 00 00 01 3d 8d "
-        //
-                + "2a cd 39 c8 d6 08 00 00 00 01 c0 a8 88 0a 00 20 " //
+                + "2a cd 39 c8 d6 08 00 00 00 01 c0 a8 88 0a 00 20 "
                 + "00 01 01 02 03 04"));
         assertTrue(mr.isAuthoritative());
         assertFalse(mr.isMapDataPresent());
@@ -73,8 +71,7 @@ public class MapRequestSerializationTest extends BaseTestCase {
         assertTrue(mr.isSmr());
 
         mr = MapRequestSerializer.getInstance().deserialize(hexToByteBuffer("1C 00 00 01 3d 8d "
-        //
-                + "2a cd 39 c8 d6 08 00 00 00 01 c0 a8 88 0a 00 20 " //
+                + "2a cd 39 c8 d6 08 00 00 00 01 c0 a8 88 0a 00 20 "
                 + "00 01 01 02 03 04"));
         assertTrue(mr.isAuthoritative());
         assertTrue(mr.isMapDataPresent());
@@ -84,10 +81,10 @@ public class MapRequestSerializationTest extends BaseTestCase {
 
     @Test
     public void deserialize__LispMobMapRequestWithReply() throws Exception {
-        MapRequest mr = MapRequestSerializer.getInstance().deserialize(hexToByteBuffer("14 00 00 01 3e f7 " //
-                + "7f 5b 41 7c 77 3c 00 01 01 01 01 01 00 01 c0 a8 " //
-                + "38 66 00 20 00 01 01 02 03 04 00 00 00 0a 01 20 " //
-                + "10 00 00 00 00 01 01 01 01 01 01 64 ff 00 00 05 " //
+        MapRequest mr = MapRequestSerializer.getInstance().deserialize(hexToByteBuffer("14 00 00 01 3e f7 "
+                + "7f 5b 41 7c 77 3c 00 01 01 01 01 01 00 01 c0 a8 "
+                + "38 66 00 20 00 01 01 02 03 04 00 00 00 0a 01 20 "
+                + "10 00 00 00 00 01 01 01 01 01 01 64 ff 00 00 05 "
                 + "00 01 c0 a8 38 66"));
         assertEquals("1.1.1.1", ((Ipv4) mr.getSourceEid().getEid().getAddress()).getIpv4().getValue());
         assertEquals("1.2.3.4/32",
@@ -99,7 +96,7 @@ public class MapRequestSerializationTest extends BaseTestCase {
     public void serialize__EmptyMapRequest() throws Exception {
 
         MapRequestBuilder mrBuilder = new MapRequestBuilder();
-        ByteBuffer expected = hexToByteBuffer("10 00 00 00 00 00 " //
+        ByteBuffer expected = hexToByteBuffer("10 00 00 00 00 00 "
                 + "00 00 00 00 00 00 00 00");
         assertArrayEquals(expected.array(), MapRequestSerializer.getInstance().serialize(mrBuilder.build()).array());
     }
@@ -110,18 +107,18 @@ public class MapRequestSerializationTest extends BaseTestCase {
         MapRequestBuilder mrBuilder = new MapRequestBuilder();
         mrBuilder.setAuthoritative(true);
         mrBuilder.setProbe(true);
-        ByteBuffer expected = hexToByteBuffer("1A 00 00 00 00 00 " //
+        ByteBuffer expected = hexToByteBuffer("1A 00 00 00 00 00 "
                 + "00 00 00 00 00 00 00 00");
         assertArrayEquals(expected.array(), MapRequestSerializer.getInstance().serialize(mrBuilder.build()).array());
         mrBuilder = new MapRequestBuilder();
         mrBuilder.setSmr(true);
         mrBuilder.setMapDataPresent(true);
-        expected = hexToByteBuffer("15 00 00 00 00 00 " //
+        expected = hexToByteBuffer("15 00 00 00 00 00 "
                 + "00 00 00 00 00 00 00 00");
         assertArrayEquals(expected.array(), MapRequestSerializer.getInstance().serialize(mrBuilder.build()).array());
         mrBuilder.setAuthoritative(true);
         mrBuilder.setProbe(true);
-        expected = hexToByteBuffer("1F 00 00 00 00 00 " //
+        expected = hexToByteBuffer("1F 00 00 00 00 00 "
                 + "00 00 00 00 00 00 00 00");
         assertArrayEquals(expected.array(), MapRequestSerializer.getInstance().serialize(mrBuilder.build()).array());
     }
@@ -131,11 +128,11 @@ public class MapRequestSerializationTest extends BaseTestCase {
         MapRequestBuilder mrBuilder = new MapRequestBuilder();
         mrBuilder.setPitr(true);
         mrBuilder.setSmrInvoked(true);
-        ByteBuffer expected = hexToByteBuffer("10 C0 00 00 00 00 " //
+        ByteBuffer expected = hexToByteBuffer("10 C0 00 00 00 00 "
                 + "00 00 00 00 00 00 00 00");
         assertArrayEquals(expected.array(), MapRequestSerializer.getInstance().serialize(mrBuilder.build()).array());
         mrBuilder.setPitr(false);
-        expected = hexToByteBuffer("10 40 00 00 00 00 " //
+        expected = hexToByteBuffer("10 40 00 00 00 00 "
                 + "00 00 00 00 00 00 00 00");
         assertArrayEquals(expected.array(), MapRequestSerializer.getInstance().serialize(mrBuilder.build()).array());
 
@@ -144,15 +141,13 @@ public class MapRequestSerializationTest extends BaseTestCase {
     @Test
     public void deserialize__FlagsInSecondByte() throws Exception {
         MapRequest mr = MapRequestSerializer.getInstance().deserialize(hexToByteBuffer("16 80 00 01 3d 8d "
-        //
-                + "2a cd 39 c8 d6 08 00 00 00 01 c0 a8 88 0a 00 20 " //
+                + "2a cd 39 c8 d6 08 00 00 00 01 c0 a8 88 0a 00 20 "
                 + "00 01 01 02 03 04"));
         assertTrue(mr.isPitr());
         assertFalse(mr.isSmrInvoked());
 
         mr = MapRequestSerializer.getInstance().deserialize(hexToByteBuffer("19 40 00 01 3d 8d "
-        //
-                + "2a cd 39 c8 d6 08 00 00 00 01 c0 a8 88 0a 00 20 " //
+                + "2a cd 39 c8 d6 08 00 00 00 01 c0 a8 88 0a 00 20 "
                 + "00 01 01 02 03 04"));
         assertFalse(mr.isPitr());
         assertTrue(mr.isSmrInvoked());
@@ -161,9 +156,8 @@ public class MapRequestSerializationTest extends BaseTestCase {
     @Test
     public void deserialize__SingleEidItem() throws Exception {
         MapRequest mr = MapRequestSerializer.getInstance().deserialize(hexToByteBuffer("16 80 00 "
-        //
                 + "01 " // single record
-                + "3d 8d 2a cd 39 c8 d6 08 00 00 00 01 c0 a8 88 0a " //
+                + "3d 8d 2a cd 39 c8 d6 08 00 00 00 01 c0 a8 88 0a "
                 + "00 20 00 01 01 02 03 04"));
 
         assertEquals(1, mr.getEidItem().size());
@@ -173,14 +167,14 @@ public class MapRequestSerializationTest extends BaseTestCase {
 
     @Test
     public void deserialize__ContainsMapReply() throws Exception {
-        MapRequest mr = MapRequestSerializer.getInstance().deserialize(hexToByteBuffer("16 80 00 " //
+        MapRequest mr = MapRequestSerializer.getInstance().deserialize(hexToByteBuffer("16 80 00 "
                 + "01 " // single record
-                + "3d 8d 2a cd 39 c8 d6 08 00 00 00 01 c0 a8 88 0a " //
+                + "3d 8d 2a cd 39 c8 d6 08 00 00 00 01 c0 a8 88 0a "
                 + "00 20 00 01 01 02 03 04 "// end of map request
-                + "00 00 " //
-                + "00 02 01 20 00 00 00 00 " //
-                + "00 01 01 02 03 04 01 02 " //
-                + "03 04 00 06 00 01 0a 0a " //
+                + "00 00 "
+                + "00 02 01 20 00 00 00 00 "
+                + "00 01 01 02 03 04 01 02 "
+                + "03 04 00 06 00 01 0a 0a "
                 + "0a 0a"
 
         ));
@@ -282,9 +276,8 @@ public class MapRequestSerializationTest extends BaseTestCase {
     @Test
     public void deserialize__MultipleItrRlocs() throws Exception {
         MapRequest mr = MapRequestSerializer.getInstance().deserialize(hexToByteBuffer("10 00 "
-        //
                 + "02 " // This means 3 ITR - RLOCs
-                + "01 3d 8d 2a cd 39 c8 d6 08 00 00 " //
+                + "01 3d 8d 2a cd 39 c8 d6 08 00 00 "
                 + "00 01 c0 a8 88 0a " // IPv4 (ITR-RLOC #1 of 3)
                 // IPv6 (ITR-RLOC #2 of 3)
                 + "00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 " //
@@ -310,7 +303,8 @@ public class MapRequestSerializationTest extends BaseTestCase {
         mrBuilder.setEidItem(new ArrayList<EidItem>());
         mrBuilder.getEidItem().add(new EidItemBuilder().setEid(LispAddressUtil.asIpv4PrefixEid("1.2.3.4/32")).build());
         ByteBuffer expected = hexToByteBuffer("12 80 01 01 00 00 " //
-                + "00 00 00 00 00 0D 00 01 0a 00 00 01 00 01 01 02 03 04 00 02 00 01 00 02 00 03 00 04 00 05 00 06 00 07 00 08 00 20 00 01 01 02 03 04");
+                + "00 00 00 00 00 0D 00 01 0a 00 00 01 00 01 01 02 03 04 00 02 00 01 00 02 00 03 00 04 00 05 00 06 "
+                + "00 07 00 08 00 20 00 01 01 02 03 04");
         assertArrayEquals(expected.array(), MapRequestSerializer.getInstance().serialize(mrBuilder.build()).array());
     }
 
@@ -321,12 +315,16 @@ public class MapRequestSerializationTest extends BaseTestCase {
         mapRequestBuilder.setMapDataPresent(true);
         mapRequestBuilder.setPitr(true);
         mapRequestBuilder.setNonce((long) 13);
-        mapRequestBuilder.setSourceEid(new SourceEidBuilder().setEid(LispAddressUtil.asIpv4Eid(("10.0.0.1"))).build());
+        mapRequestBuilder.setSourceEid(new SourceEidBuilder().setEid(LispAddressUtil.asIpv4Eid(("10.0.0.1")))
+                .build());
         mapRequestBuilder.setItrRloc(new ArrayList<ItrRloc>());
-        mapRequestBuilder.getItrRloc().add(new ItrRlocBuilder().setRloc(LispAddressUtil.asIpv4Rloc("1.2.3.4")).build());
-        mapRequestBuilder.getItrRloc().add(new ItrRlocBuilder().setRloc(LispAddressUtil.asIpv6Rloc("1:2:3:4:5:6:7:8")).build());
+        mapRequestBuilder.getItrRloc().add(new ItrRlocBuilder().setRloc(LispAddressUtil.asIpv4Rloc("1.2.3.4"))
+                .build());
+        mapRequestBuilder.getItrRloc().add(new ItrRlocBuilder().setRloc(LispAddressUtil.asIpv6Rloc("1:2:3:4:5:6:7:8"))
+                .build());
         mapRequestBuilder.setEidItem(new ArrayList<EidItem>());
-        mapRequestBuilder.getEidItem().add(new EidItemBuilder().setEid(LispAddressUtil.asIpv4PrefixEid("1.2.3.4/32")).build());
+        mapRequestBuilder.getEidItem().add(new EidItemBuilder().setEid(LispAddressUtil.asIpv4PrefixEid("1.2.3.4/32"))
+                .build());
         MapReplyBuilder mapreplyBuilder = new MapReplyBuilder();
         MappingRecordBuilder recordBuilder = new MappingRecordBuilder();
 
@@ -339,10 +337,11 @@ public class MapRequestSerializationTest extends BaseTestCase {
         mapreplyBuilder.setMappingRecord(recordBuilder.build());
         mapRequestBuilder.setMapReply(mapreplyBuilder.build());
 
-        ByteBuffer expected = hexToByteBuffer("16 80 01 01 00 00 " //
-                + "00 00 00 00 00 0D 00 01 0a 00 00 01 00 01 01 02 03 04 00 02 00 01 00 02 00 03 00 04 00 05 00 06 00 07 00 08 00 20 00 01 01 02 03 04 "// map
-                                                                                                                                                        // request
+        ByteBuffer expected = hexToByteBuffer("16 80 01 01 00 00 "
+                + "00 00 00 00 00 0D 00 01 0a 00 00 01 00 01 01 02 03 04 00 02 00 01 00 02 00 03 00 04 00 05 00 06 "
+                + "00 07 00 08 00 20 00 01 01 02 03 04 "// map
                 + "00 00 00 00 01 00 00 00 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 02");
-        assertArrayEquals(expected.array(), MapRequestSerializer.getInstance().serialize(mapRequestBuilder.build()).array());
+        assertArrayEquals(expected.array(),
+                MapRequestSerializer.getInstance().serialize(mapRequestBuilder.build()).array());
     }
 }
index c2da6876d7a1222a00d109a3650a63bc7609e531..9f26d4350155890bba28c94111cc68b8d52c56a3 100644 (file)
@@ -86,7 +86,8 @@ public class AfiListSerializerTest extends BaseTestCase {
         rb.setAddressType(AfiListLcaf.class);
         rb.setVirtualNetworkId(null);
         rb.setAddress((Address)
-                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.AfiListBuilder()
+                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.AfiListBuilder()
                 .setAfiList(listBuilder.build()).build());
 
         ByteBuffer buf = ByteBuffer.allocate(LispAddressSerializer.getInstance().getAddressSize(rb.build()));
@@ -108,7 +109,8 @@ public class AfiListSerializerTest extends BaseTestCase {
         rb.setAddressType(AfiListLcaf.class);
         rb.setVirtualNetworkId(null);
         rb.setAddress((Address)
-                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.AfiListBuilder()
+                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.AfiListBuilder()
                 .setAfiList(listBuilder.build()).build());
 
         ByteBuffer buf = ByteBuffer.allocate(LispAddressSerializer.getInstance().getAddressSize(rb.build()));
@@ -126,13 +128,16 @@ public class AfiListSerializerTest extends BaseTestCase {
         AfiListBuilder listBuilder = new AfiListBuilder().setAddressList(new ArrayList<SimpleAddress>());
 
         listBuilder.getAddressList().add(ip1);
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.afi.list.AfiList address1 = listBuilder.build();
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.afi.list.AfiList address1 = listBuilder.build();
         listBuilder.setAddressList(new ArrayList<SimpleAddress>());
         listBuilder.getAddressList().add(ip1);
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.afi.list.AfiList address2 = listBuilder.build();
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.afi.list.AfiList address2 = listBuilder.build();
         listBuilder.setAddressList(new ArrayList<SimpleAddress>());
         listBuilder.getAddressList().add(ip2);
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.afi.list.AfiList address3 = listBuilder.build();
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.afi.list.AfiList address3 = listBuilder.build();
 
         assertEquals(address1, address2);
         Assert.assertNotEquals(address2, address3);
index 5d94db24722d7fb6a9b3be9748588e655ab9be91..88d70ede48347d3991c9f867e023dc4f0ead9707 100644 (file)
@@ -100,7 +100,8 @@ public class ApplicationDataSerializerTest extends BaseTestCase {
         eb.setAddressType(ApplicationDataLcaf.class);
         eb.setVirtualNetworkId(null);
         eb.setAddress((Address)
-                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.ApplicationDataBuilder()
+                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.ApplicationDataBuilder()
                 .setApplicationData(addressBuilder.build()).build());
 
         ByteBuffer buf = ByteBuffer.allocate(LispAddressSerializer.getInstance().getAddressSize(eb.build()));
index 0a1e47b2b58003240c6eb4e3996a8c7844566a16..cd1a9b85c74aeaf9618ffae37a93d1298b0f2d41 100644 (file)
@@ -110,7 +110,8 @@ public class ExplicitLocatorPathSerializerTest extends BaseTestCase {
         rb.setAddressType(ExplicitLocatorPathLcaf.class);
         rb.setVirtualNetworkId(null);
         rb.setAddress((Address)
-                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.ExplicitLocatorPathBuilder()
+                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.ExplicitLocatorPathBuilder()
                 .setExplicitLocatorPath(elpb.build()).build());
 
         ByteBuffer buf = ByteBuffer.allocate(LispAddressSerializer.getInstance().getAddressSize(rb.build()));
@@ -128,7 +129,8 @@ public class ExplicitLocatorPathSerializerTest extends BaseTestCase {
         rb.setAddressType(ExplicitLocatorPathLcaf.class);
         rb.setVirtualNetworkId(null);
         rb.setAddress((Address)
-                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.ExplicitLocatorPathBuilder().build());
+                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.ExplicitLocatorPathBuilder().build());
 
         ByteBuffer buf = ByteBuffer.allocate(LispAddressSerializer.getInstance().getAddressSize(rb.build()));
         LispAddressSerializer.getInstance().serialize(buf, rb.build());
index f124f62ce2bbf3372d10da40e7c90258fcef11d7..71fd8d7e693f27305b3fde41d4d9642b916267a1 100644 (file)
@@ -82,7 +82,8 @@ public class KeyValueAddressSerializerTest extends BaseTestCase {
         eb.setAddressType(KeyValueAddressLcaf.class);
         eb.setVirtualNetworkId(null);
         eb.setAddress((Address)
-                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.KeyValueAddressBuilder()
+                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.KeyValueAddressBuilder()
                 .setKeyValueAddress(addressBuilder.build()).build());
 
         ByteBuffer buf = ByteBuffer.allocate(LispAddressSerializer.getInstance().getAddressSize(eb.build()));
index 7fbc3cb22800859c5a4efc1cfd0ab74426b8779a..250afd31a44f5ac255315c7c84570a5f3b55bcac 100644 (file)
@@ -93,7 +93,8 @@ public class SourceDestKeySerializerTest extends BaseTestCase {
         eb.setAddressType(SourceDestKeyLcaf.class);
         eb.setVirtualNetworkId(null);
         eb.setAddress((Address)
-                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.SourceDestKeyBuilder()
+                new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105
+                .lisp.address.address.SourceDestKeyBuilder()
                 .setSourceDestKey(addressBuilder.build()).build());
 
         ByteBuffer buf = ByteBuffer.allocate(LispAddressSerializer.getInstance().getAddressSize(eb.build()));
index 80570f9339f564734f191b4bc59690409df51397..9a4f1635f380de1cab308c296b9a1f13026f24a8 100644 (file)
@@ -62,8 +62,8 @@ public class LispNeutronPortHandler extends LispNeutronService implements
         // Check if port.hostID is in map-server, if it is, get host eidtoloc
         // record?
         if (port.getBindinghostID() == null) {
-            LOG.error("Adding new Neutron port to lisp service mapping service failed. Port does not have Host_ID. Port : "
-                    port.toString());
+            LOG.error("Adding new Neutron port to lisp mapping service failed. Port does not have Host_ID. Port: {}",
+                    port.toString());
             return;
         }
         Eid hostAddress = LispAddressUtil.asDistinguishedNameEid(port.getBindinghostID());
@@ -104,7 +104,8 @@ public class LispNeutronPortHandler extends LispNeutronService implements
                 // iana code.
 
                 eidAddress = LispAddressUtil.asIpv4PrefixEid(ip.getIpAddress() + "/32");
-                lispNeutronService.getMappingDbService().addMapping(LispUtil.buildAddMappingInput(eidAddress, hostLocRecords));
+                lispNeutronService.getMappingDbService().addMapping(LispUtil.buildAddMappingInput(eidAddress,
+                        hostLocRecords));
             }
         }
 
index e313626b758923d479affb95c5d0b025518febc9..7aa397165b3f18b7bbc4b9520b51bf35086b5f4c 100644 (file)
@@ -60,7 +60,8 @@ public class LispSouthboundRPC implements OdlLispSbService {
         LOG.trace("sendMapNotify called!!");
         if (mapNotifyInput != null) {
             ByteBuffer outBuffer = MapNotifySerializer.getInstance().serialize(mapNotifyInput.getMapNotify());
-            lispSbPlugin.handleSerializedLispBuffer(mapNotifyInput.getTransportAddress(), outBuffer, MessageType.MapNotify);
+            lispSbPlugin.handleSerializedLispBuffer(mapNotifyInput.getTransportAddress(), outBuffer,
+                    MessageType.MapNotify);
         } else {
             LOG.warn("MapNotify was null");
             return Futures.immediateFuture(RpcResultBuilder.<Void> failed().build());
@@ -73,7 +74,8 @@ public class LispSouthboundRPC implements OdlLispSbService {
         LOG.trace("sendMapReply called!!");
         if (mapReplyInput != null) {
             ByteBuffer outBuffer = MapReplySerializer.getInstance().serialize(mapReplyInput.getMapReply());
-            lispSbPlugin.handleSerializedLispBuffer(mapReplyInput.getTransportAddress(), outBuffer, MessageType.MapReply);
+            lispSbPlugin.handleSerializedLispBuffer(mapReplyInput.getTransportAddress(), outBuffer,
+                    MessageType.MapReply);
         } else {
             LOG.warn("MapReply was null");
             return Futures.immediateFuture(RpcResultBuilder.<Void> failed().build());
@@ -86,7 +88,8 @@ public class LispSouthboundRPC implements OdlLispSbService {
         LOG.trace("sendMapRequest called!!");
         if (mapRequestInput != null) {
             ByteBuffer outBuffer = MapRequestSerializer.getInstance().serialize(mapRequestInput.getMapRequest());
-            lispSbPlugin.handleSerializedLispBuffer(mapRequestInput.getTransportAddress(), outBuffer, MessageType.MapRequest);
+            lispSbPlugin.handleSerializedLispBuffer(mapRequestInput.getTransportAddress(), outBuffer,
+                    MessageType.MapRequest);
         } else {
             LOG.debug("MapRequest was null");
             return Futures.immediateFuture(RpcResultBuilder.<Void> failed().build());
@@ -99,7 +102,8 @@ public class LispSouthboundRPC implements OdlLispSbService {
         LOG.trace("sendMapRegister called!!");
         if (mapRegisterInput != null) {
             ByteBuffer outBuffer = MapRegisterSerializer.getInstance().serialize(mapRegisterInput.getMapRegister());
-            lispSbPlugin.handleSerializedLispBuffer(mapRegisterInput.getTransportAddress(), outBuffer, MessageType.MapRegister);
+            lispSbPlugin.handleSerializedLispBuffer(mapRegisterInput.getTransportAddress(), outBuffer,
+                    MessageType.MapRegister);
         } else {
             LOG.debug("MapRegister was null");
             return Futures.immediateFuture(RpcResultBuilder.<Void> failed().build());
index 0d7bd8ff3af3a02a63a7effe286aa2bc8297dc2e..649f207476d5ab031ee899cae6df33a1696329f0 100644 (file)
@@ -45,7 +45,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @ChannelHandler.Sharable
-public class LispSouthboundHandler extends SimpleChannelInboundHandler<DatagramPacket> implements ILispSouthboundService {
+public class LispSouthboundHandler extends SimpleChannelInboundHandler<DatagramPacket>
+        implements ILispSouthboundService {
     private NotificationPublishService notificationPublishService;
     protected static final Logger LOG = LoggerFactory.getLogger(LispSouthboundHandler.class);
 
@@ -92,7 +93,8 @@ public class LispSouthboundHandler extends SimpleChannelInboundHandler<DatagramP
         try {
             handleMapRequest(inBuffer, extractEncapsulatedSourcePort(inBuffer));
         } catch (RuntimeException re) {
-            throw new LispMalformedPacketException("Couldn't deserialize Map-Request (len=" + inBuffer.capacity() + ")", re);
+            throw new LispMalformedPacketException("Couldn't deserialize Map-Request (len="
+                    + inBuffer.capacity() + ")", re);
         }
     }
 
@@ -107,7 +109,8 @@ public class LispSouthboundHandler extends SimpleChannelInboundHandler<DatagramP
             RequestMappingBuilder requestMappingBuilder = new RequestMappingBuilder();
             requestMappingBuilder.setMapRequest(LispNotificationHelper.convertMapRequest(request));
             TransportAddressBuilder transportAddressBuilder = new TransportAddressBuilder();
-            transportAddressBuilder.setIpAddress(LispNotificationHelper.getIpAddressFromInetAddress(finalSourceAddress));
+            transportAddressBuilder.setIpAddress(
+                    LispNotificationHelper.getIpAddressFromInetAddress(finalSourceAddress));
             transportAddressBuilder.setPort(new PortNumber(port));
             requestMappingBuilder.setTransportAddress(transportAddressBuilder.build());
             if (notificationPublishService != null) {
@@ -117,7 +120,8 @@ public class LispSouthboundHandler extends SimpleChannelInboundHandler<DatagramP
                 LOG.warn("Notification Provider is null!");
             }
         } catch (RuntimeException re) {
-            throw new LispMalformedPacketException("Couldn't deserialize Map-Request (len=" + inBuffer.capacity() + ")", re);
+            throw new LispMalformedPacketException("Couldn't deserialize Map-Request (len="
+                    + inBuffer.capacity() + ")", re);
         } catch (InterruptedException e) {
             LOG.warn("Notification publication interrupted!");
         }
@@ -132,14 +136,16 @@ public class LispSouthboundHandler extends SimpleChannelInboundHandler<DatagramP
             } else if (ipType == 6) {
                 inBuffer.position(inBuffer.position() + PacketHeader.Length.IPV6_NO_EXT - 1);
             } else {
-                throw new LispMalformedPacketException("Couldn't deserialize Map-Request: inner packet has unknown IP version: " + ipType);
+                throw new LispMalformedPacketException(
+                        "Couldn't deserialize Map-Request: inner packet has unknown IP version: " + ipType);
             }
 
             int encapsulatedSourcePort = inBuffer.getShort() & 0xFFFF;
             inBuffer.position(inBuffer.position() + PacketHeader.Length.UDP - 2);
             return encapsulatedSourcePort;
         } catch (RuntimeException re) {
-            throw new LispMalformedPacketException("Couldn't deserialize Map-Request (len=" + inBuffer.capacity() + ")", re);
+            throw new LispMalformedPacketException("Couldn't deserialize Map-Request (len="
+                    + inBuffer.capacity() + ")", re);
         }
     }
 
@@ -159,7 +165,8 @@ public class LispSouthboundHandler extends SimpleChannelInboundHandler<DatagramP
                 LOG.warn("Notification Provider is null!");
             }
         } catch (RuntimeException re) {
-            throw new LispMalformedPacketException("Couldn't deserialize Map-Register (len=" + inBuffer.capacity() + ")", re);
+            throw new LispMalformedPacketException("Couldn't deserialize Map-Register (len="
+                    + inBuffer.capacity() + ")", re);
         } catch (InterruptedException e) {
             LOG.warn("Notification publication interrupted!");
         }
@@ -181,7 +188,8 @@ public class LispSouthboundHandler extends SimpleChannelInboundHandler<DatagramP
                 LOG.warn("Notification Provider is null!");
             }
         } catch (RuntimeException re) {
-            throw new LispMalformedPacketException("Couldn't deserialize Map-Notify (len=" + inBuffer.capacity() + ")", re);
+            throw new LispMalformedPacketException("Couldn't deserialize Map-Notify (len="
+                    + inBuffer.capacity() + ")", re);
         } catch (InterruptedException e) {
             LOG.warn("Notification publication interrupted!");
         }
@@ -203,7 +211,8 @@ public class LispSouthboundHandler extends SimpleChannelInboundHandler<DatagramP
                 LOG.warn("Notification Provider is null!");
             }
         } catch (RuntimeException re) {
-            throw new LispMalformedPacketException("Couldn't deserialize Map-Reply (len=" + inBuffer.capacity() + ")", re);
+            throw new LispMalformedPacketException("Couldn't deserialize Map-Reply (len="
+                    + inBuffer.capacity() + ")", re);
         } catch (InterruptedException e) {
             LOG.warn("Notification publication interrupted!");
         }
index f17855961a6c00c3e6cac62b4721d6eeae253858..61d3f6951b56ecb66f55c200db8de2c8432cc6c4 100644 (file)
@@ -34,7 +34,8 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class LispXtrSouthboundHandler extends SimpleChannelInboundHandler<DatagramPacket> implements ILispSouthboundService {
+public class LispXtrSouthboundHandler extends SimpleChannelInboundHandler<DatagramPacket>
+        implements ILispSouthboundService {
     private NotificationPublishService notificationPublishService;
     protected static final Logger LOG = LoggerFactory.getLogger(LispXtrSouthboundHandler.class);
 
@@ -67,7 +68,8 @@ public class LispXtrSouthboundHandler extends SimpleChannelInboundHandler<Datagr
             XtrRequestMappingBuilder requestMappingBuilder = new XtrRequestMappingBuilder();
             requestMappingBuilder.setMapRequest(LispNotificationHelper.convertMapRequest(request));
             TransportAddressBuilder transportAddressBuilder = new TransportAddressBuilder();
-            transportAddressBuilder.setIpAddress(LispNotificationHelper.getIpAddressFromInetAddress(finalSourceAddress));
+            transportAddressBuilder.setIpAddress(
+                    LispNotificationHelper.getIpAddressFromInetAddress(finalSourceAddress));
             transportAddressBuilder.setPort(new PortNumber(LispMessage.PORT_NUM));
             requestMappingBuilder.setTransportAddress(transportAddressBuilder.build());
             if (notificationPublishService != null) {
@@ -77,7 +79,8 @@ public class LispXtrSouthboundHandler extends SimpleChannelInboundHandler<Datagr
                 LOG.warn("Notification Provider is null!");
             }
         } catch (RuntimeException re) {
-            throw new LispMalformedPacketException("Couldn't deserialize Map-Request (len=" + inBuffer.capacity() + ")", re);
+            throw new LispMalformedPacketException(
+                    "Couldn't deserialize Map-Request (len=" + inBuffer.capacity() + ")", re);
         } catch (InterruptedException e) {
             LOG.warn("Notification publication interrupted!");
         }
@@ -97,7 +100,8 @@ public class LispXtrSouthboundHandler extends SimpleChannelInboundHandler<Datagr
                 LOG.warn("Notification Provider is null!");
             }
         } catch (RuntimeException re) {
-            throw new LispMalformedPacketException("Couldn't deserialize Map-Reply (len=" + buffer.capacity() + ")", re);
+            throw new LispMalformedPacketException(
+                    "Couldn't deserialize Map-Reply (len=" + buffer.capacity() + ")", re);
         } catch (InterruptedException e) {
             LOG.warn("Notification publication interrupted!");
         }
index 2e557b527f0a1035b39030ef210c67340be854a0..f3be91732c3c9f19fa732d37bc7df6e1c92fd41d 100644 (file)
@@ -116,12 +116,13 @@ public class LispSouthboundServiceTest extends BaseTestCase {
         // Nonce: 0x3d8d2acd39c8d608
         // ITR-RLOC AFI=1 Address=192.168.136.10
         // Record 1: 1.2.3.4/32
-        mapRequestPacket = extractWSUdpByteArray(new String("0000   00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00 " //
+        mapRequestPacket = extractWSUdpByteArray(new String(
+                  "0000   00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00 "
                 + "0010   00 58 00 00 40 00 40 11 3c 93 7f 00 00 01 7f 00 "
                 + "0020   00 01 e4 c0 10 f6 00 44 fe 57 80 00 00 00 45 00 "
                 + "0030   00 38 d4 31 00 00 ff 11 56 f3 c0 a8 88 0a 01 02 "
                 + "0040   03 04 dd b4 10 f6 00 24 ef 3a 10 00 00 01 3d 8d "
-                + "0050   2a cd 39 c8 d6 08 00 01 01 02 03 04 00 01 c0 a8 88 0a 00 20 " //
+                + "0050   2a cd 39 c8 d6 08 00 01 01 02 03 04 00 01 c0 a8 88 0a 00 20 "
                 + "0060   00 01 01 02 03 04"));
         mapReplyBuilder = new MapReplyBuilder();
         mapReplyBuilder.setMappingRecordItem(new ArrayList<MappingRecordItem>());
@@ -156,12 +157,13 @@ public class LispSouthboundServiceTest extends BaseTestCase {
         // 255/0
         //
 
-        mapRegisterPacket = extractWSUdpByteArray(new String("0000   00 50 56 ee d1 4f 00 0c 29 7a ce 79 08 00 45 00 " //
+        mapRegisterPacket = extractWSUdpByteArray(new String(
+                  "0000   00 50 56 ee d1 4f 00 0c 29 7a ce 79 08 00 45 00 "
                 + "0010   00 5c 00 00 40 00 40 11 d4 db c0 a8 88 0a 80 df "
                 + "0020   9c 23 d6 40 10 f6 00 48 59 a4 38 00 01 01 00 00 "
                 + "0030   00 00 00 00 00 00 00 01 00 14 0e a4 c6 d8 a4 06 "
                 + "0040   71 7c 33 a4 5c 4a 83 1c de 74 53 03 0c ad 00 00 "
-                + "0050   00 0a 01 20 10 00 00 00 00 01 99 10 fe 01 01 64 " //
+                + "0050   00 0a 01 20 10 00 00 00 00 01 99 10 fe 01 01 64 "
                 + "0060   ff 00 00 05 00 01 c0 a8 88 0a"));
         mapNotifyBuilder = new MapNotifyBuilder();
         mapNotifyBuilder.setAuthenticationData(new byte[0]);
@@ -177,8 +179,9 @@ public class LispSouthboundServiceTest extends BaseTestCase {
 
     @Test(expected = LispMalformedPacketException.class)
     public void mapRegister__IllegalPacket() throws Exception {
-        mapRegisterPacket = extractWSUdpByteArray(new String("0000   00 0c 29 7a ce 8d 00 0c 29 e4 ef 70 08 00 45 00 "
-                + "0010   00 68 00 00 40 00 40 11 26 15 0a 01 00 6e 0a 01 " //
+        mapRegisterPacket = extractWSUdpByteArray(new String(
+                  "0000   00 0c 29 7a ce 8d 00 0c 29 e4 ef 70 08 00 45 00 "
+                + "0010   00 68 00 00 40 00 40 11 26 15 0a 01 00 6e 0a 01 "
                 + "0020   00 01 10 f6 10 f6 00 54 03 3b 38 00 01 01 00 00 "));
 
         handleMapRegisterPacket(mapRegisterPacket);
@@ -186,18 +189,20 @@ public class LispSouthboundServiceTest extends BaseTestCase {
 
     @Test(expected = LispMalformedPacketException.class)
     public void mapRequest__IllegalPacket() throws Exception {
-        mapRequestPacket = extractWSUdpByteArray(new String("0000   00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00 " //
+        mapRequestPacket = extractWSUdpByteArray(new String(
+                  "0000   00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00 "
                 + "0010   00 58 00 00 40 00 40 11 3c 93 7f 00 00 01 7f 00 "
                 + "0020   00 01 e4 c0 10 f6 00 44 fe 57 80 00 00 00 45 00 "
-                + "0030   00 38 d4 31 00 00 ff 11 56 f3 c0 a8 88 0a 01 02 " //
+                + "0030   00 38 d4 31 00 00 ff 11 56 f3 c0 a8 88 0a 01 02 "
                 + "0040   03 04 dd b4 10 f6 00 24 ef 3a 10 00 00 01 3d 8d "));
         handleMapRequestPacket(mapRequestPacket);
     }
 
     @Test(expected = LispMalformedPacketException.class)
     public void mapRequest__IllegalEncapsulatedPacket() throws Exception {
-        mapRequestPacket = extractWSUdpByteArray(new String("0000   00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00 " //
-                + "0010   00 58 00 00 40 00 40 11 3c 93 7f 00 00 01 7f 00 " //
+        mapRequestPacket = extractWSUdpByteArray(new String(
+                  "0000   00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00 "
+                + "0010   00 58 00 00 40 00 40 11 3c 93 7f 00 00 01 7f 00 "
                 + "0020   00 01 e4 c0 10 f6 00 44 fe 57 80 00 00 00 45 00 "));
         handleMapRequestPacket(mapRequestPacket);
     }
@@ -221,13 +226,14 @@ public class LispSouthboundServiceTest extends BaseTestCase {
         // Priority/Weight: 255/0
         // Local RLOC: 192.168.136.51, Reachable, Priority/Weight: 6/100,
         // Multicast Priority/Weight: 255/0
-        mapRegisterPacket = extractWSUdpByteArray(new String("0000   00 0c 29 7a ce 8d 00 0c 29 e4 ef 70 08 00 45 00 "
-                + "0010   00 68 00 00 40 00 40 11 26 15 0a 01 00 6e 0a 01 " //
-                + "0020   00 01 10 f6 10 f6 00 54 03 3b 38 00 01 01 00 00 " //
-                + "0030   00 00 00 00 00 00 00 01 00 14 ae d8 7b d4 9c 59 " //
-                + "0040   e9 35 75 6e f1 29 27 a3 45 20 96 06 c2 e1 00 00 " //
-                + "0050   00 0a 02 20 10 00 00 00 00 01 ac 01 01 02 01 64 " //
-                + "0060   ff 00 00 05 00 01 0a 01 00 6e 06 64 ff 00 00 05 " //
+        mapRegisterPacket = extractWSUdpByteArray(new String(
+                  "0000   00 0c 29 7a ce 8d 00 0c 29 e4 ef 70 08 00 45 00 "
+                + "0010   00 68 00 00 40 00 40 11 26 15 0a 01 00 6e 0a 01 "
+                + "0020   00 01 10 f6 10 f6 00 54 03 3b 38 00 01 01 00 00 "
+                + "0030   00 00 00 00 00 00 00 01 00 14 ae d8 7b d4 9c 59 "
+                + "0040   e9 35 75 6e f1 29 27 a3 45 20 96 06 c2 e1 00 00 "
+                + "0050   00 0a 02 20 10 00 00 00 00 01 ac 01 01 02 01 64 "
+                + "0060   ff 00 00 05 00 01 0a 01 00 6e 06 64 ff 00 00 05 "
                 + "0070   00 01 c0 a8 88 33"));
 
         oneOf(nps).putNotification(with(lispNotificationSaver));
@@ -256,13 +262,14 @@ public class LispSouthboundServiceTest extends BaseTestCase {
         // Local RLOC: 10.0.58.156, Reachable, Priority/Weight: 1/100, Multicast
         // Priority/Weight: 255/0
 
-        mapRegisterPacket = extractWSUdpByteArray(new String("0000   00 0c 29 34 3e 1b 00 0c 29 f6 d6 0d 08 00 45 00 " //
-                + "0010   00 68 00 00 40 00 40 11 ea c3 0a 00 3a 9c 0a 00 " //
-                + "0020   01 26 10 f6 10 f6 00 54 f5 9a 38 00 03 01 00 00 " //
-                + "0030   00 00 00 00 00 00 00 01 00 14 22 97 ff 61 ec d8 " //
-                + "0040   0f 91 c6 c4 01 ef 7f bb 77 58 39 5c 92 23 00 00 " //
-                + "0050   00 0a 01 80 10 00 00 00 00 02 26 10 00 d0 ff ff " //
-                + "0060   01 92 00 00 00 00 00 00 00 01 01 64 ff 00 00 05 " //
+        mapRegisterPacket = extractWSUdpByteArray(new String(
+                  "0000   00 0c 29 34 3e 1b 00 0c 29 f6 d6 0d 08 00 45 00 "
+                + "0010   00 68 00 00 40 00 40 11 ea c3 0a 00 3a 9c 0a 00 "
+                + "0020   01 26 10 f6 10 f6 00 54 f5 9a 38 00 03 01 00 00 "
+                + "0030   00 00 00 00 00 00 00 01 00 14 22 97 ff 61 ec d8 "
+                + "0040   0f 91 c6 c4 01 ef 7f bb 77 58 39 5c 92 23 00 00 "
+                + "0050   00 0a 01 80 10 00 00 00 00 02 26 10 00 d0 ff ff "
+                + "0060   01 92 00 00 00 00 00 00 00 01 01 64 ff 00 00 05 "
                 + "0070   00 01 0a 00 3a 9c"));
 
         oneOf(nps).putNotification(with(lispNotificationSaver));
@@ -300,12 +307,13 @@ public class LispSouthboundServiceTest extends BaseTestCase {
 
     @Test
     public void mapRegister__NonSetMBit() throws Exception {
-        byte[] registerWithNonSetMBit = extractWSUdpByteArray(new String("0000   00 50 56 ee d1 4f 00 0c 29 7a ce 79 08 00 45 00 " //
-                + "0010   00 5c 00 00 40 00 40 11 d4 db c0 a8 88 0a 80 df " //
+        byte[] registerWithNonSetMBit = extractWSUdpByteArray(new String(
+                  "0000   00 50 56 ee d1 4f 00 0c 29 7a ce 79 08 00 45 00 "
+                + "0010   00 5c 00 00 40 00 40 11 d4 db c0 a8 88 0a 80 df "
                 + "0020   9c 23 d6 40 10 f6 00 48 59 a4 38 00 00 01 00 00 "
                 + "0030   00 00 00 00 00 00 00 01 00 14 79 d1 44 66 19 99 "
-                + "0040   83 63 a7 79 6e f0 40 97 54 26 3a 44 b4 eb 00 00 " //
-                + "0050   00 0a 01 20 10 00 00 00 00 01 99 10 fe 01 01 64 " //
+                + "0040   83 63 a7 79 6e f0 40 97 54 26 3a 44 b4 eb 00 00 "
+                + "0050   00 0a 01 20 10 00 00 00 00 01 99 10 fe 01 01 64 "
                 + "0060   ff 00 00 05 00 01 c0 a8 88 0a"));
         stubMapRegister(true);
 
@@ -316,12 +324,13 @@ public class LispSouthboundServiceTest extends BaseTestCase {
 
     @Test
     public void mapRegister__NonSetMBitWithNonZeroReservedBits() throws Exception {
-        byte[] registerWithNonSetMBit = extractWSUdpByteArray(new String("0000   00 50 56 ee d1 4f 00 0c 29 7a ce 79 08 00 45 00 " //
+        byte[] registerWithNonSetMBit = extractWSUdpByteArray(new String(
+                  "0000   00 50 56 ee d1 4f 00 0c 29 7a ce 79 08 00 45 00 "
                 + "0010   00 5c 00 00 40 00 40 11 d4 db c0 a8 88 0a 80 df "
                 + "0020   9c 23 d6 40 10 f6 00 48 59 a4 38 00 02 01 00 00 "
                 + "0030   00 00 00 00 00 00 00 01 00 14 c0 c7 c5 2f 57 f6 "
                 + "0040   e7 20 25 3d e8 b2 07 e2 63 de 62 2b 7a 20 00 00 "
-                + "0050   00 0a 01 20 10 00 00 00 00 01 99 10 fe 01 01 64 " //
+                + "0050   00 0a 01 20 10 00 00 00 00 01 99 10 fe 01 01 64 "
                 + "0060   ff 00 00 05 00 01 c0 a8 88 0a"));
         stubMapRegister(true);
 
@@ -331,12 +340,13 @@ public class LispSouthboundServiceTest extends BaseTestCase {
 
     @Test
     public void mapRegister__SetMBitWithNonZeroReservedBits() throws Exception {
-        byte[] registerWithNonSetMBit = extractWSUdpByteArray(new String("0000   00 50 56 ee d1 4f 00 0c 29 7a ce 79 08 00 45 00 " //
+        byte[] registerWithNonSetMBit = extractWSUdpByteArray(new String(
+                  "0000   00 50 56 ee d1 4f 00 0c 29 7a ce 79 08 00 45 00 "
                 + "0010   00 5c 00 00 40 00 40 11 d4 db c0 a8 88 0a 80 df "
                 + "0020   9c 23 d6 40 10 f6 00 48 59 a4 38 00 03 01 00 00 "
                 + "0030   00 00 00 00 00 00 00 01 00 14 a2 72 40 7b 1a ae "
                 + "0040   4e 6b e2 e5 e1 01 40 8a c9 e1 d1 80 cb 72 00 00 "
-                + "0050   00 0a 01 20 10 00 00 00 00 01 99 10 fe 01 01 64 " //
+                + "0050   00 0a 01 20 10 00 00 00 00 01 99 10 fe 01 01 64 "
                 + "0060   ff 00 00 05 00 01 c0 a8 88 0a"));
         stubMapRegister(true);
 
@@ -352,7 +362,8 @@ public class LispSouthboundServiceTest extends BaseTestCase {
         System.arraycopy(mapRegisterPacket, 0, extraDataPacket, 0, mapRegisterPacket.length);
         stubMapRegister(true);
 
-        DatagramPacket dp = new DatagramPacket(wrappedBuffer(extraDataPacket), new InetSocketAddress(0), new InetSocketAddress(0));
+        DatagramPacket dp = new DatagramPacket(wrappedBuffer(extraDataPacket), new InetSocketAddress(0),
+                new InetSocketAddress(0));
         testedLispService.handlePacket(dp);
         // Check map register fields.
         // XXX: test
@@ -397,11 +408,13 @@ public class LispSouthboundServiceTest extends BaseTestCase {
         assertHexEquals((byte) 0x00, result[1]);
         assertHexEquals((byte) 0x00, result[2]);
 
-        byte[] registerWithoutTypeWithoutAuthenticationData = ArrayUtils.addAll(Arrays.copyOfRange(mapRegisterPacket, 3, 16),
+        byte[] registerWithoutTypeWithoutAuthenticationData = ArrayUtils.addAll(
+                Arrays.copyOfRange(mapRegisterPacket, 3, 16),
                 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);
+        ArrayAssert.assertEquals(registerWithoutTypeWithoutAuthenticationData,
+                notifyWithoutTypeWithOutAuthenticationData);
     }
 
     @Ignore
@@ -438,7 +451,8 @@ public class LispSouthboundServiceTest extends BaseTestCase {
         // Map-Reply Record: EID prefix: 2610:d0:ffff:192::1/128, TTL: 10,
         // Authoritative, No-Action
 
-        mapRequestPacket = extractWSUdpByteArray(new String("0000   00 0c 29 34 3e 1b 00 0c 29 f6 d6 0d 08 00 45 00 " //
+        mapRequestPacket = extractWSUdpByteArray(new String(
+                  "0000   00 0c 29 34 3e 1b 00 0c 29 f6 d6 0d 08 00 45 00 "
                 + "0010   00 b0 00 00 40 00 40 11 ea 7b 0a 00 3a 9c 0a 00 "
                 + "0020   01 26 10 f6 10 f6 00 9c 9b 19 80 00 00 00 60 00 "
                 + "0030   00 00 00 68 11 ff 26 10 00 d0 ff ff 01 92 00 00 "
@@ -447,8 +461,8 @@ public class LispSouthboundServiceTest extends BaseTestCase {
                 + "0060   00 01 ff f5 bf 5d 7b 75 93 e6 00 02 26 10 00 d0 "
                 + "0070   ff ff 01 92 00 00 00 00 00 00 00 01 00 01 0a 00 "
                 + "0080   3a 9c 00 80 00 02 26 10 00 d0 ff ff 01 92 00 00 "
-                + "0090   00 00 00 00 00 02 00 00 00 0a 01 80 10 00 00 00 " //
-                + "00a0   00 02 26 10 00 d0 ff ff 01 92 00 00 00 00 00 00 " //
+                + "0090   00 00 00 00 00 02 00 00 00 0a 01 80 10 00 00 00 "
+                + "00a0   00 02 26 10 00 d0 ff ff 01 92 00 00 00 00 00 00 "
                 + "00b0   00 01 01 64 ff 00 00 05 00 01 0a 00 3a 9c"));
 
         oneOf(nps).putNotification(with(lispNotificationSaver));
@@ -456,7 +470,8 @@ public class LispSouthboundServiceTest extends BaseTestCase {
 
         handleMapRequestAsByteArray(mapRequestPacket);
         assertEquals(LispAddressUtil.asIpv6Eid("2610:d0:ffff:192:0:0:0:1"), lastMapRequest().getSourceEid().getEid());
-        assertEquals(LispAddressUtil.asIpv6PrefixEid("2610:d0:ffff:192:0:0:0:2/128"), lastMapRequest().getEidItem().get(0).getEid());
+        assertEquals(LispAddressUtil.asIpv6PrefixEid("2610:d0:ffff:192:0:0:0:2/128"),
+                lastMapRequest().getEidItem().get(0).getEid());
     }
 
     @Ignore
@@ -467,7 +482,8 @@ public class LispSouthboundServiceTest extends BaseTestCase {
         // (2610:d0:ffff:192::2)
         // encapsulated UDP source port: 4342
 
-        mapRequestPacket = extractWSUdpByteArray(new String("0000   00 0c 29 34 3e 1b 00 0c 29 f6 d6 0d 08 00 45 00 " //
+        mapRequestPacket = extractWSUdpByteArray(new String(
+                  "0000   00 0c 29 34 3e 1b 00 0c 29 f6 d6 0d 08 00 45 00 "
                 + "0010   00 b0 00 00 40 00 40 11 ea 7b 0a 00 3a 9c 0a 00 "
                 + "0020   01 26 10 f6 10 f6 00 9c 9b 19 80 00 00 00 60 00 "
                 + "0030   00 00 00 68 11 ff 26 10 00 d0 ff ff 01 92 00 00 "
@@ -476,8 +492,8 @@ public class LispSouthboundServiceTest extends BaseTestCase {
                 + "0060   00 01 ff f5 bf 5d 7b 75 93 e6 00 02 26 10 00 d0 "
                 + "0070   ff ff 01 92 00 00 00 00 00 00 00 01 00 01 0a 00 "
                 + "0080   3a 9c 00 80 00 02 26 10 00 d0 ff ff 01 92 00 00 "
-                + "0090   00 00 00 00 00 02 00 00 00 0a 01 80 10 00 00 00 " //
-                + "00a0   00 02 26 10 00 d0 ff ff 01 92 00 00 00 00 00 00 " //
+                + "0090   00 00 00 00 00 02 00 00 00 0a 01 80 10 00 00 00 "
+                + "00a0   00 02 26 10 00 d0 ff ff 01 92 00 00 00 00 00 00 "
                 + "00b0   00 01 01 64 ff 00 00 05 00 01 0a 00 3a 9c"));
         oneOf(nps).putNotification(with(lispNotificationSaver));
         // ret(mapReply);
@@ -491,14 +507,15 @@ public class LispSouthboundServiceTest extends BaseTestCase {
         // encapsulated LISP packet
         // Source EID = 153.16.254.1
 
-        mapRequestPacket = extractWSUdpByteArray(new String("0000   00 0c 29 7a ce 83 00 15 17 c6 4a c9 08 00 45 00 " //
+        mapRequestPacket = extractWSUdpByteArray(new String(
+                  "0000   00 0c 29 7a ce 83 00 15 17 c6 4a c9 08 00 45 00 "
                 + "0010   00 78 00 00 40 00 3e 11 ec b1 0a 00 01 26 0a 00 "
                 + "0020   3a 9e 10 f6 10 f6 00 64 c3 a5 80 00 00 00 45 00 "
                 + "0030   00 58 d4 31 00 00 ff 11 31 89 99 10 fe 01 0a 00 "
                 + "0040   14 c8 10 f6 10 f6 00 44 84 ee 10 00 00 01 ba f9 "
                 + "0050   ff 53 27 36 38 3a 00 01 99 10 fe 01 00 01 0a 00 "
                 + "0060   01 26 00 20 00 01 0a 00 14 c8 00 00 00 0a 01 20 "
-                + "0070   10 00 00 00 00 01 99 10 fe 01 01 64 ff 00 00 05 " //
+                + "0070   10 00 00 00 00 01 99 10 fe 01 01 64 ff 00 00 05 "
                 + "0080   00 01 0a 00 01 26"));
 
         oneOf(nps).putNotification(with(lispNotificationSaver));
@@ -528,7 +545,8 @@ public class LispSouthboundServiceTest extends BaseTestCase {
         byte expectedRecordCount = (byte) 1;
         assertEquals(expectedRecordCount, result[MapReplyIpv4SingleLocatorPos.RECORD_COUNT]);
 
-        assertEquals(MaskUtil.getMaskForAddress(mappingRecordBuilder.getEid().getAddress()), result[MapReplyIpv4SingleLocatorPos.EID_MASK_LEN]);
+        assertEquals(MaskUtil.getMaskForAddress(mappingRecordBuilder.getEid().getAddress()),
+                result[MapReplyIpv4SingleLocatorPos.EID_MASK_LEN]);
         assertEquals(AddressFamily.IpV4.getIntValue(), ByteUtil.getInt(result, MapReplyIpv4SingleLocatorPos.AFI_TYPE));
         assertEquals(0x0a0014c8, ByteUtil.getInt(result, MapReplyIpv4SingleLocatorPos.EID_PREFIX));
     }
@@ -547,7 +565,8 @@ public class LispSouthboundServiceTest extends BaseTestCase {
         byte expectedRecordCount = (byte) 1;
         assertEquals(expectedRecordCount, result[MapReplyIpv4SingleLocatorPos.RECORD_COUNT]);
 
-        assertEquals(MaskUtil.getMaskForAddress(mappingRecordBuilder.getEid().getAddress()), result[MapReplyIpv4SingleLocatorPos.EID_MASK_LEN]);
+        assertEquals(MaskUtil.getMaskForAddress(mappingRecordBuilder.getEid().getAddress()),
+                result[MapReplyIpv4SingleLocatorPos.EID_MASK_LEN]);
         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 };
 
@@ -620,7 +639,8 @@ public class LispSouthboundServiceTest extends BaseTestCase {
         mappingRecordBuilder.getLocatorRecord().add(
                 new LocatorRecordBuilder().setRouted(true).setRloc(LispAddressUtil.asIpv4Rloc("4.3.2.1")).build());
         mappingRecordBuilder.getLocatorRecord().add(
-                new LocatorRecordBuilder().setRouted(true).setRloc(LispAddressUtil.asIpv6Rloc("0:0:0:0:0:0:0:1")).build());
+                new LocatorRecordBuilder().setRouted(true).setRloc(LispAddressUtil.asIpv6Rloc("0:0:0:0:0:0:0:1"))
+                .build());
         stubHandleRequest();
 
         byte[] result = handleMapRequestAsByteArray(mapRequestPacket);
@@ -635,8 +655,8 @@ public class LispSouthboundServiceTest 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, MapReplyIpv4SecondLocatorPos.LOCATOR + 16));
+        ArrayAssert.assertEquals(expectedIpv6Rloc, Arrays.copyOfRange(result, MapReplyIpv4SecondLocatorPos.LOCATOR,
+                MapReplyIpv4SecondLocatorPos.LOCATOR + 16));
 
         assertEquals(0x01, result[MapReplyIpv4SecondLocatorPos.LOCATOR_RBIT] & 0x01);
     }
@@ -647,12 +667,13 @@ public class LispSouthboundServiceTest extends BaseTestCase {
         // UDP: 49289 -> 4342
         // LISP(Type = 14 UNKNOWN!!!, P=1, M=1
 
-        byte[] unknownTypePacket = extractWSUdpByteArray(new String("0000   00 50 56 ee d1 4f 00 0c 29 7a ce 79 08 00 45 00 " //
+        byte[] unknownTypePacket = extractWSUdpByteArray(new String(
+                  "0000   00 50 56 ee d1 4f 00 0c 29 7a ce 79 08 00 45 00 "
                 + "0010   00 5c 00 00 40 00 40 11 d4 db c0 a8 88 0a 80 df "
                 + "0020   9c 23 d6 40 10 f6 00 48 59 a4 F8 00 01 01 00 00 "
                 + "0030   00 00 00 00 00 00 00 01 00 14 e8 f5 0b c5 c5 f2 "
                 + "0040   b0 21 27 a8 21 41 04 f3 46 5a a5 68 89 ec 00 00 "
-                + "0050   00 0a 01 20 10 00 00 00 00 01 99 10 fe 01 01 64 " //
+                + "0050   00 0a 01 20 10 00 00 00 00 01 99 10 fe 01 01 64 "
                 + "0060   ff 00 00 05 00 01 c0 a8 88 0a"));
         assertNull(handlePacket(unknownTypePacket));
     }
@@ -664,15 +685,16 @@ public class LispSouthboundServiceTest extends BaseTestCase {
         // ITR-RLOC 1: 10.1.0.111
         // ITR-RLOC 2: 192.168.136.51
         //
-        mapRequestPacket = extractWSUdpByteArray(new String("0000   00 0c 29 7a ce 8d 00 0c 29 e4 ef 70 08 00 45 00 "
-                + "0010   00 8a 00 00 40 00 40 11 25 f2 0a 01 00 6f 0a 01 " //
-                + "0020   00 01 10 f6 10 f6 00 76 06 1f 80 00 00 00 45 00 " //
-                + "0030   00 6a d4 31 00 00 ff 11 2a 3e ac 01 01 02 08 08 " //
-                + "0040   08 08 10 f6 10 f6 00 56 63 14 10 00 01 01 79 67 " //
-                + "0050   ff 75 a0 61 66 19 00 01 ac 01 01 02 00 01 0a 01 " //
-                + "0060   00 6f 00 01 c0 a8 88 33 00 20 00 01 08 08 08 08 " //
-                + "0070   00 00 00 0a 02 20 10 00 00 00 00 01 ac 01 01 02 " //
-                + "0080   01 64 ff 00 00 05 00 01 0a 01 00 6f 06 64 ff 00 " //
+        mapRequestPacket = extractWSUdpByteArray(new String(
+                  "0000   00 0c 29 7a ce 8d 00 0c 29 e4 ef 70 08 00 45 00 "
+                + "0010   00 8a 00 00 40 00 40 11 25 f2 0a 01 00 6f 0a 01 "
+                + "0020   00 01 10 f6 10 f6 00 76 06 1f 80 00 00 00 45 00 "
+                + "0030   00 6a d4 31 00 00 ff 11 2a 3e ac 01 01 02 08 08 "
+                + "0040   08 08 10 f6 10 f6 00 56 63 14 10 00 01 01 79 67 "
+                + "0050   ff 75 a0 61 66 19 00 01 ac 01 01 02 00 01 0a 01 "
+                + "0060   00 6f 00 01 c0 a8 88 33 00 20 00 01 08 08 08 08 "
+                + "0070   00 00 00 0a 02 20 10 00 00 00 00 01 ac 01 01 02 "
+                + "0080   01 64 ff 00 00 05 00 01 0a 01 00 6f 06 64 ff 00 "
                 + "0090   00 05 00 01 c0 a8 88 33"));
 
         oneOf(nps).putNotification(with(lispNotificationSaver));
@@ -715,7 +737,8 @@ public class LispSouthboundServiceTest extends BaseTestCase {
     }
 
     private DatagramPacket handleMapRequestPacket(byte[] inPacket) {
-        DatagramPacket dp = new DatagramPacket(wrappedBuffer(inPacket), new InetSocketAddress(0), new InetSocketAddress(0));
+        DatagramPacket dp = new DatagramPacket(wrappedBuffer(inPacket), new InetSocketAddress(0),
+                new InetSocketAddress(0));
         // Unless we explicitly set the source port, it will be -1, which breaks some tests
         // This is till not the real port number, but it's better
         //dp.setPort(LispMessage.PORT_NUM);
@@ -724,7 +747,8 @@ public class LispSouthboundServiceTest extends BaseTestCase {
     }
 
     private DatagramPacket handleMapRegisterPacket(byte[] inPacket) {
-        DatagramPacket dp = new DatagramPacket(wrappedBuffer(inPacket), new InetSocketAddress(0), new InetSocketAddress(0));
+        DatagramPacket dp = new DatagramPacket(wrappedBuffer(inPacket), new InetSocketAddress(0),
+                new InetSocketAddress(0));
         // Unless we explicitly set the source port, it will be -1, which breaks some tests
         // This is till not the real port number, but it's better
         //dp.setPort(LispMessage.PORT_NUM);
@@ -738,7 +762,8 @@ public class LispSouthboundServiceTest extends BaseTestCase {
 
     private DatagramPacket handlePacket(byte[] inPacket) {
         // TODO get from mock
-        testedLispService.handlePacket(new DatagramPacket(wrappedBuffer(inPacket), new InetSocketAddress(0), new InetSocketAddress(0)));
+        testedLispService.handlePacket(new DatagramPacket(wrappedBuffer(inPacket), new InetSocketAddress(0),
+                new InetSocketAddress(0)));
         return null;
     }