Make test intent types serializable by Kryo

- Move test intent types from inner class to onos.core.newintent package
- Register test intent types to Kryo

Change-Id: I908e7224e50da293e8fb0ac7b4910b9de778d610
diff --git a/src/main/java/net/onrc/onos/core/newintent/TestIntent.java b/src/main/java/net/onrc/onos/core/newintent/TestIntent.java
new file mode 100644
index 0000000..f401759
--- /dev/null
+++ b/src/main/java/net/onrc/onos/core/newintent/TestIntent.java
@@ -0,0 +1,30 @@
+package net.onrc.onos.core.newintent;
+
+import net.onrc.onos.api.newintent.AbstractIntent;
+import net.onrc.onos.api.newintent.InstallableIntent;
+import net.onrc.onos.api.newintent.IntentId;
+
+/**
+ * A intent used in the unit test.
+ *
+ * FIXME: we don't want to expose this class publicly, but the current Kryo
+ * serialization mechanism does not allow this class to be private and placed
+ * on testing directory.
+ */
+public class TestIntent extends AbstractIntent implements InstallableIntent {
+    /**
+     * Constructs an instance with the specified intent ID.
+     *
+     * @param id intent ID
+     */
+    public TestIntent(IntentId id) {
+        super(id);
+    }
+
+    /**
+     * Constructor for serializer.
+     */
+    protected TestIntent() {
+        super();
+    }
+}