Various small fixes

Change-Id: I83802169d0d968f7b88d4be2cedba74b15fdd7da
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpEvpnEsi.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpEvpnEsi.java
index b6816e8..883be89 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpEvpnEsi.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpEvpnEsi.java
@@ -16,7 +16,7 @@
 
 package org.onosproject.bgpio.types;
 
-import java.util.Objects;
+import java.util.Arrays;
 import org.jboss.netty.buffer.ChannelBuffer;
 import com.google.common.base.MoreObjects;
 
@@ -78,7 +78,7 @@
 
     @Override
     public int hashCode() {
-        return Objects.hash(ethernetSegmentidentifier);
+        return Arrays.hashCode(ethernetSegmentidentifier);
     };
 
     @Override
@@ -89,9 +89,7 @@
 
         if (obj instanceof BgpEvpnEsi) {
             BgpEvpnEsi that = (BgpEvpnEsi) obj;
-            if (this.ethernetSegmentidentifier == that.ethernetSegmentidentifier) {
-                return true;
-            }
+            return Arrays.equals(this.ethernetSegmentidentifier, that.ethernetSegmentidentifier);
         }
 
         return false;
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpEvpnLabel.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpEvpnLabel.java
index 60348ac..b6a2e87 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpEvpnLabel.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpEvpnLabel.java
@@ -16,7 +16,7 @@
 
 package org.onosproject.bgpio.types;
 
-import java.util.Objects;
+import java.util.Arrays;
 import org.jboss.netty.buffer.ChannelBuffer;
 import com.google.common.base.MoreObjects;
 
@@ -87,9 +87,7 @@
 
             BgpEvpnLabel that = (BgpEvpnLabel) obj;
 
-            if (this.mplsLabel == that.mplsLabel) {
-                return true;
-            }
+            return Arrays.equals(this.mplsLabel, that.mplsLabel);
         }
 
         return false;
@@ -97,7 +95,7 @@
 
     @Override
     public int hashCode() {
-        return Objects.hashCode(mplsLabel);
+        return Arrays.hashCode(mplsLabel);
     }
 
     @Override
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/RouteTarget.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/RouteTarget.java
index 5a009f9..2d48788 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/RouteTarget.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/RouteTarget.java
@@ -17,7 +17,10 @@
 package org.onosproject.bgpio.types;
 
 import com.google.common.base.MoreObjects;
-import com.google.common.base.Objects;
+
+import java.util.Arrays;
+import java.util.Objects;
+
 import org.jboss.netty.buffer.ChannelBuffer;
 
 /**
@@ -107,7 +110,7 @@
         if (obj instanceof RouteTarget) {
             RouteTarget that = (RouteTarget) obj;
             if (this.type == that.type
-                    && this.routeTarget == that.routeTarget) {
+                    && Arrays.equals(this.routeTarget, that.routeTarget)) {
                 return true;
             }
         }
@@ -116,7 +119,7 @@
 
     @Override
     public int hashCode() {
-        return Objects.hashCode(routeTarget);
+        return Objects.hash(type, Arrays.hashCode(routeTarget));
     }
 
     @Override