Pcep TLVs UT updated for common review comments

Change-Id: Icf51f79e9cadd1ce4bdd5b2b67a1ad1095cc8ab8
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/PcepLabelUpdate.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/PcepLabelUpdate.java
old mode 100755
new mode 100644
index a3489e6..5ef870d
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/PcepLabelUpdate.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/PcepLabelUpdate.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014 Open Networking Laboratory
+ * Copyright 2015 Open Networking Laboratory
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepInterLayerObjectVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepInterLayerObjectVer1.java
index 8ab6470..8171e8d 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepInterLayerObjectVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepInterLayerObjectVer1.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/BGPLSidentifierTlv.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/BGPLSidentifierTlv.java
index 7453686..0c20b21 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/BGPLSidentifierTlv.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/BGPLSidentifierTlv.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/MPLSProtocolMaskTlv.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/MPLSProtocolMaskTlv.java
index f0cf5b5..ce495cd 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/MPLSProtocolMaskTlv.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/MPLSProtocolMaskTlv.java
@@ -155,9 +155,9 @@
         if (obj instanceof MPLSProtocolMaskTlv) {

             MPLSProtocolMaskTlv other = (MPLSProtocolMaskTlv) obj;

             if (isRawValueSet) {

-                return Objects.equals(this.bLFlag, other.bLFlag) && Objects.equals(this.bRFlag, other.bRFlag);

-            } else {

                 return Objects.equals(this.rawValue, other.rawValue);

+            } else {

+                return Objects.equals(this.bLFlag, other.bLFlag) && Objects.equals(this.bRFlag, other.bRFlag);

             }

         }

         return false;

diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/NodeFlagBitsTlv.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/NodeFlagBitsTlv.java
index fb4d362..7e0b09c 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/NodeFlagBitsTlv.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/NodeFlagBitsTlv.java
@@ -174,10 +174,10 @@
         if (obj instanceof NodeFlagBitsTlv) {

             NodeFlagBitsTlv other = (NodeFlagBitsTlv) obj;

             if (isRawValueSet) {

+                return Objects.equals(this.rawValue, other.rawValue);

+            } else {

                 return Objects.equals(this.bOFlag, other.bOFlag) && Objects.equals(this.bTFlag, other.bTFlag)

                         && Objects.equals(this.bEFlag, other.bEFlag) && Objects.equals(this.bBFlag, other.bBFlag);

-            } else {

-                return Objects.equals(this.rawValue, other.rawValue);

             }

         }

         return false;

diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/OSPFareaIDsubTlv.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/OSPFareaIDsubTlv.java
index fc2f723..96a57e9 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/OSPFareaIDsubTlv.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/OSPFareaIDsubTlv.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/AutonomousSystemTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/AutonomousSystemTlvTest.java
index 37fb558..bf4eb0a 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/AutonomousSystemTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/AutonomousSystemTlvTest.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/BGPLSidentifierTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/BGPLSidentifierTlvTest.java
index e00646b..78963e4 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/BGPLSidentifierTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/BGPLSidentifierTlvTest.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/GmplsCapabilityTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/GmplsCapabilityTlvTest.java
index 2b9a52b..435a52c 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/GmplsCapabilityTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/GmplsCapabilityTlvTest.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/IPv4InterfaceAddressTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/IPv4InterfaceAddressTlvTest.java
index 5eb8cdf..fffb47a 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/IPv4InterfaceAddressTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/IPv4InterfaceAddressTlvTest.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/IPv4NeighborAddressTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/IPv4NeighborAddressTlvTest.java
index 51d1d7b..130e618 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/IPv4NeighborAddressTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/IPv4NeighborAddressTlvTest.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/IPv4TERouterIdOfLocalNodeTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/IPv4TERouterIdOfLocalNodeTlvTest.java
index 2a0e56c..82009ad 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/IPv4TERouterIdOfLocalNodeTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/IPv4TERouterIdOfLocalNodeTlvTest.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/IPv4TERouterIdOfRemoteNodeTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/IPv4TERouterIdOfRemoteNodeTlvTest.java
index c7edf94..2bf1b73 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/IPv4TERouterIdOfRemoteNodeTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/IPv4TERouterIdOfRemoteNodeTlvTest.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/LinkLocalRemoteIdentifiersTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/LinkLocalRemoteIdentifiersTlvTest.java
index e350cbb..d3ecf4a 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/LinkLocalRemoteIdentifiersTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/LinkLocalRemoteIdentifiersTlvTest.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/LinkNameTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/LinkNameTlvTest.java
index 25c7b64..c89a77f 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/LinkNameTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/LinkNameTlvTest.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

@@ -15,13 +15,13 @@
  */

 package org.onosproject.pcepio;

 

-import com.google.common.testing.EqualsTester;

-

 import org.junit.Test;

 import org.onosproject.pcepio.types.LinkNameTlv;

 

+import com.google.common.testing.EqualsTester;

+

 /**

- * Test of the LinkNameTlv.

+ * Equality test for LinkNameTlv.

  */

 public class LinkNameTlvTest {

     private final byte[] rawValue1 = new byte[] {0x01, 0x00};

@@ -30,13 +30,12 @@
     private final LinkNameTlv tlv1 = new LinkNameTlv(rawValue1, (short) rawValue1.length);

     private final LinkNameTlv sameAsTlv1 = LinkNameTlv.of(tlv1.getValue(), tlv1.getLength());

     private final LinkNameTlv tlv2 = new LinkNameTlv(rawValue2, (short) 0);

-    private final LinkNameTlv sameAsTlv2 = new LinkNameTlv(rawValue2, (short) rawValue2.length);

 

     @Test

     public void basics() {

         new EqualsTester()

         .addEqualityGroup(tlv1, sameAsTlv1)

-        .addEqualityGroup(tlv2, sameAsTlv2)

+        .addEqualityGroup(tlv2)

         .testEquals();

     }

 }

diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/LinkProtectionTypeTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/LinkProtectionTypeTlvTest.java
index 29270b7..f6deae7 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/LinkProtectionTypeTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/LinkProtectionTypeTlvTest.java
@@ -1 +1 @@
-/*
 * Copyright 2014 Open Networking Laboratory
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.onosproject.pcepio;

import com.google.common.testing.EqualsTester;

import org.junit.Test;
import org.onosproject.pcepio.types.LinkProtectionTypeTlv;

/**
 * Test of the LinkProtectionTypeTlv.
 */
public class LinkProtectionTypeTlvTest {
    private final byte rawValue1 = 0x0A;
    private final byte rawValue2 = 0x0A;

    private final LinkProtectionTypeTlv tlv1 = new LinkProtectionTypeTlv(rawValue1);
    private final LinkProtectionTypeTlv tlv2 = new LinkProtectionTypeTlv(rawValue2, (byte) 0);

    @Test
    public void basics() {
        new EqualsTester()
        .addEqualityGroup(tlv1, tlv2)
        .testEquals();
    }
}

\ No newline at end of file
+/*
 * Copyright 2015 Open Networking Laboratory
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.onosproject.pcepio;

import org.junit.Test;
import org.onosproject.pcepio.types.LinkProtectionTypeTlv;

import com.google.common.testing.EqualsTester;

/**
 * Test of the LinkProtectionTypeTlv.
 */
public class LinkProtectionTypeTlvTest {
    private final byte rawValue1 = 0x0A;
    private final byte rawValue2 = 0x0B;

    private final LinkProtectionTypeTlv tlv1 = new LinkProtectionTypeTlv(rawValue1);
    private final LinkProtectionTypeTlv sameAsTlv1 = new LinkProtectionTypeTlv(rawValue1);
    private final LinkProtectionTypeTlv tlv2 = new LinkProtectionTypeTlv(rawValue2, (byte) 0);

    @Test
    public void basics() {
        new EqualsTester()
        .addEqualityGroup(tlv1, sameAsTlv1)
        .addEqualityGroup(tlv2)
        .testEquals();
    }
}

\ No newline at end of file
diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/MPLSProtocolMaskTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/MPLSProtocolMaskTlvTest.java
index 52f346a..d395db4 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/MPLSProtocolMaskTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/MPLSProtocolMaskTlvTest.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

@@ -15,25 +15,27 @@
  */

 package org.onosproject.pcepio;

 

-import com.google.common.testing.EqualsTester;

-

 import org.junit.Test;

 import org.onosproject.pcepio.types.MPLSProtocolMaskTlv;

 

+import com.google.common.testing.EqualsTester;

+

 /**

  * Test of the MPLSProtocolMaskTlv.

  */

 public class MPLSProtocolMaskTlvTest {

     private final byte rawValue1 = 0x0A;

-    private final byte rawValue2 = 0x0A;

+    private final byte rawValue2 = 0x0B;

 

     private final MPLSProtocolMaskTlv tlv1 = new MPLSProtocolMaskTlv(rawValue1);

+    private final MPLSProtocolMaskTlv sameAsTlv1 = new MPLSProtocolMaskTlv(rawValue1);

     private final MPLSProtocolMaskTlv tlv2 = MPLSProtocolMaskTlv.of(rawValue2);

 

     @Test

     public void basics() {

         new EqualsTester()

-        .addEqualityGroup(tlv1, tlv2)

+        .addEqualityGroup(tlv1, sameAsTlv1)

+        .addEqualityGroup(tlv2)

         .testEquals();

     }

 }

diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/MaximumLinkBandwidthTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/MaximumLinkBandwidthTlvTest.java
index 831779a..8e5ba2b 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/MaximumLinkBandwidthTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/MaximumLinkBandwidthTlvTest.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

@@ -25,15 +25,17 @@
  */

 public class MaximumLinkBandwidthTlvTest {

     private final int rawValue1 = 0x0A;

-    private final int rawValue2 = 0x0A;

+    private final int rawValue2 = 0x0B;

 

     private final MaximumLinkBandwidthTlv tlv1 = new MaximumLinkBandwidthTlv(rawValue1);

+    private final MaximumLinkBandwidthTlv sameAsTlv1 = new MaximumLinkBandwidthTlv(rawValue1);

     private final MaximumLinkBandwidthTlv tlv2 = MaximumLinkBandwidthTlv.of(rawValue2);

 

     @Test

     public void basics() {

         new EqualsTester()

-        .addEqualityGroup(tlv1, tlv2)

+        .addEqualityGroup(tlv1, sameAsTlv1)

+        .addEqualityGroup(tlv2)

         .testEquals();

     }

 }

diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/MaximumReservableLinkBandwidthTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/MaximumReservableLinkBandwidthTlvTest.java
index 70e0b06..d601f0d 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/MaximumReservableLinkBandwidthTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/MaximumReservableLinkBandwidthTlvTest.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

@@ -25,15 +25,17 @@
  */

 public class MaximumReservableLinkBandwidthTlvTest {

     private final int rawValue1 = 0x0A;

-    private final int rawValue2 = 0x0A;

+    private final int rawValue2 = 0x0B;

 

     private final MaximumReservableLinkBandwidthTlv tlv1 = new MaximumReservableLinkBandwidthTlv(rawValue1);

+    private final MaximumReservableLinkBandwidthTlv sameAsTlv1 = new MaximumReservableLinkBandwidthTlv(rawValue1);

     private final MaximumReservableLinkBandwidthTlv tlv2 = MaximumReservableLinkBandwidthTlv.of(rawValue2);

 

     @Test

     public void basics() {

         new EqualsTester()

-        .addEqualityGroup(tlv1, tlv2)

+        .addEqualityGroup(tlv1, sameAsTlv1)

+        .addEqualityGroup(tlv2)

         .testEquals();

     }

 }

diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/NodeFlagBitsTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/NodeFlagBitsTlvTest.java
index 7fb7109..76e32e6 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/NodeFlagBitsTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/NodeFlagBitsTlvTest.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

@@ -15,24 +15,27 @@
  */

 package org.onosproject.pcepio;

 

-import com.google.common.testing.EqualsTester;

-

 import org.junit.Test;

 import org.onosproject.pcepio.types.NodeFlagBitsTlv;

 

+import com.google.common.testing.EqualsTester;

+

 /**

  * Test of the NodeFlagBitsTlv.

  */

 public class NodeFlagBitsTlvTest {

     private final byte rawValue1 = 0x0A;

+    private final byte rawValue2 = 0x0B;

 

     private final NodeFlagBitsTlv tlv1 = new NodeFlagBitsTlv(rawValue1);

-    private final NodeFlagBitsTlv tlv2 = NodeFlagBitsTlv.of(tlv1.getbyte());

+    private final NodeFlagBitsTlv sameAsTlv1 = new NodeFlagBitsTlv(rawValue1);

+    private final NodeFlagBitsTlv tlv2 = NodeFlagBitsTlv.of(rawValue2);

 

     @Test

     public void basics() {

         new EqualsTester()

-        .addEqualityGroup(tlv1, tlv2)

+        .addEqualityGroup(tlv1, sameAsTlv1)

+        .addEqualityGroup(tlv2)

         .testEquals();

     }

 }

diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/NodeNameTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/NodeNameTlvTest.java
index a824001..de0e937 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/NodeNameTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/NodeNameTlvTest.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

@@ -15,11 +15,11 @@
  */

 package org.onosproject.pcepio;

 

-import com.google.common.testing.EqualsTester;

-

 import org.junit.Test;

 import org.onosproject.pcepio.types.NodeNameTlv;

 

+import com.google.common.testing.EqualsTester;

+

 /**

  * Test of the NodeNameTlv.

  */

@@ -30,13 +30,12 @@
     private final NodeNameTlv tlv1 = new NodeNameTlv(rawValue1, (short) rawValue1.length);

     private final NodeNameTlv sameAsTlv1 = NodeNameTlv.of(tlv1.getValue(), tlv1.getLength());

     private final NodeNameTlv tlv2 = new NodeNameTlv(rawValue2, (short) 0);

-    private final NodeNameTlv sameAsTlv2 = new NodeNameTlv(rawValue2, (short) rawValue2.length);

 

     @Test

     public void basics() {

         new EqualsTester()

         .addEqualityGroup(tlv1, sameAsTlv1)

-        .addEqualityGroup(tlv2, sameAsTlv2)

+        .addEqualityGroup(tlv2)

         .testEquals();

     }

 }

diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/OSPFareaIDsubTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/OSPFareaIDsubTlvTest.java
index dce63c7..f287450 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/OSPFareaIDsubTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/OSPFareaIDsubTlvTest.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/OpaqueLinkAttributeTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/OpaqueLinkAttributeTlvTest.java
index e7cf051..784b8ba 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/OpaqueLinkAttributeTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/OpaqueLinkAttributeTlvTest.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

@@ -15,11 +15,11 @@
  */

 package org.onosproject.pcepio;

 

-import com.google.common.testing.EqualsTester;

-

 import org.junit.Test;

 import org.onosproject.pcepio.types.OpaqueLinkAttributeTlv;

 

+import com.google.common.testing.EqualsTester;

+

 /**

  * Test of the OpaqueLinkAttributeTlv.

  */

@@ -30,13 +30,12 @@
     private final OpaqueLinkAttributeTlv tlv1 = new OpaqueLinkAttributeTlv(rawValue1, (short) rawValue1.length);

     private final OpaqueLinkAttributeTlv sameAsTlv1 = OpaqueLinkAttributeTlv.of(tlv1.getValue(), tlv1.getLength());

     private final OpaqueLinkAttributeTlv tlv2 = new OpaqueLinkAttributeTlv(rawValue2, (short) 0);

-    private final OpaqueLinkAttributeTlv sameAsTlv2 = new OpaqueLinkAttributeTlv(rawValue2, (short) rawValue2.length);

 

     @Test

     public void basics() {

         new EqualsTester()

         .addEqualityGroup(tlv1, sameAsTlv1)

-        .addEqualityGroup(tlv2, sameAsTlv2)

+        .addEqualityGroup(tlv2)

         .testEquals();

     }

 }

diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/PceccCapabilityTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/PceccCapabilityTlvTest.java
index ca329cb..6a68f33 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/PceccCapabilityTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/PceccCapabilityTlvTest.java
@@ -1,5 +1,5 @@
 /*

- * Copyright 2014 Open Networking Laboratory

+ * Copyright 2015 Open Networking Laboratory

  *

  * Licensed under the Apache License, Version 2.0 (the "License");

  * you may not use this file except in compliance with the License.

@@ -15,25 +15,27 @@
  */

 package org.onosproject.pcepio;

 

-import com.google.common.testing.EqualsTester;

-

 import org.junit.Test;

 import org.onosproject.pcepio.types.PceccCapabilityTlv;

 

+import com.google.common.testing.EqualsTester;

+

 /**

  * Test of the PceccCapabilityTlv.

  */

 public class PceccCapabilityTlvTest {

     private final int rawValue1 = 0x0A;

-    private final int rawValue2 = 0x0A;

+    private final int rawValue2 = 0x0B;

 

     private final PceccCapabilityTlv tlv1 = new PceccCapabilityTlv(rawValue1);

+    private final PceccCapabilityTlv sameAsTlv1 = new PceccCapabilityTlv(rawValue1);

     private final PceccCapabilityTlv tlv2 = PceccCapabilityTlv.of(rawValue2);

 

     @Test

     public void basics() {

         new EqualsTester()

-        .addEqualityGroup(tlv1, tlv2)

+        .addEqualityGroup(tlv1, sameAsTlv1)

+        .addEqualityGroup(tlv2)

         .testEquals();

     }

 }