add toString

Change-Id: Iaab5d307e93b3784359a3bc1f80791b1ea833e58
diff --git a/core/api/src/main/java/org/onlab/onos/mastership/MastershipEvent.java b/core/api/src/main/java/org/onlab/onos/mastership/MastershipEvent.java
index fdbb645..e99f9ae 100644
--- a/core/api/src/main/java/org/onlab/onos/mastership/MastershipEvent.java
+++ b/core/api/src/main/java/org/onlab/onos/mastership/MastershipEvent.java
@@ -4,6 +4,8 @@
 import org.onlab.onos.event.AbstractEvent;
 import org.onlab.onos.net.DeviceId;
 
+import com.google.common.base.MoreObjects;
+
 /**
  * Describes a device mastership event.
  */
@@ -62,4 +64,14 @@
     public RoleInfo roleInfo() {
         return roleInfo;
     }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(getClass())
+                .add("time", time())
+                .add("type", type())
+                .add("subject", subject())
+                .add("roleInfo", roleInfo)
+                .toString();
+    }
 }