Renamed the intent package

net.onrc.onos.intent.* => net.onrc.onos.core.intent.*

Change-Id: Id61f79ed52acf3b91af4ebad2515ac5b7d6dc5e1
diff --git a/src/test/java/net/onrc/onos/core/intent/ErrorIntentTest.java b/src/test/java/net/onrc/onos/core/intent/ErrorIntentTest.java
new file mode 100644
index 0000000..9fbbd56
--- /dev/null
+++ b/src/test/java/net/onrc/onos/core/intent/ErrorIntentTest.java
@@ -0,0 +1,40 @@
+package net.onrc.onos.core.intent;
+
+import static org.junit.Assert.*;
+import net.onrc.onos.core.intent.ErrorIntent;
+import net.onrc.onos.core.intent.Intent;
+import net.onrc.onos.core.intent.ErrorIntent.ErrorType;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Unit tests for the ErrorIntent class.
+ * @author Toshio Koide (t-koide@onlab.us)
+ */
+public class ErrorIntentTest {
+
+    @Before
+    public void setUp() throws Exception {
+    }
+
+    @After
+    public void tearDown() throws Exception {
+    }
+
+    /**
+     * Test the result of executing constructor of the ErrorIntent class.
+     * This test checks the fields of id, errorType, message and parentIntent.
+     */
+    @Test
+    public void testCreate() {
+        Intent parentIntent = new Intent("1");
+        ErrorIntent errorIntent = new ErrorIntent(ErrorType.PATH_NOT_FOUND, "path not found", parentIntent);
+
+        assertEquals("1", errorIntent.getId());
+        assertEquals(ErrorType.PATH_NOT_FOUND, errorIntent.errorType);
+        assertEquals("path not found", errorIntent.message);
+        assertEquals(parentIntent, errorIntent.parentIntent);
+    }
+}