add key parameter to PathIntent and MplsPathIntent constructors

Change-Id: I157c1e3e10dc3e3ebc1dbc6f9a1c9fe769337ee3
diff --git a/core/api/src/test/java/org/onosproject/net/intent/ConnectivityIntentTest.java b/core/api/src/test/java/org/onosproject/net/intent/ConnectivityIntentTest.java
index e03ed85..c510b60 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/ConnectivityIntentTest.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/ConnectivityIntentTest.java
@@ -33,6 +33,7 @@
 public abstract class ConnectivityIntentTest extends IntentTest {
 
     public static final ApplicationId APPID = new TestApplicationId("foo");
+    public static final Key KEY = Key.of(1L, APPID);
 
     public static final IntentId IID = new IntentId(123);
     public static final TrafficSelector MATCH = DefaultTrafficSelector.emptySelector();
diff --git a/core/api/src/test/java/org/onosproject/net/intent/MplsIntentTest.java b/core/api/src/test/java/org/onosproject/net/intent/MplsIntentTest.java
index 196d6ad..7fbdf23 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/MplsIntentTest.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/MplsIntentTest.java
@@ -112,6 +112,5 @@
         assertThat(intent1.selector(), equalTo(intent2.selector()));
         assertThat(intent1.treatment(), equalTo(intent2.treatment()));
         assertThat(intent1.priority(), is(PRIORITY));
-
     }
 }
diff --git a/core/api/src/test/java/org/onosproject/net/intent/MplsPathIntentTest.java b/core/api/src/test/java/org/onosproject/net/intent/MplsPathIntentTest.java
index 551f19e..64528cb 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/MplsPathIntentTest.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/MplsPathIntentTest.java
@@ -47,6 +47,7 @@
     Optional<MplsLabel> label2;
     TrafficSelector selector;
     TrafficTreatment treatment;
+    static final Key KEY1 = Key.of(5L, APP_ID);
 
     @Before
     public void mplsPathIntentTestSetUp() {
@@ -58,6 +59,7 @@
         label2 = Optional.of(MplsLabel.mplsLabel(2));
         intent1 = MplsPathIntent.builder()
                 .appId(APP_ID)
+                .key(KEY1)
                 .ingressLabel(label1)
                 .egressLabel(label2)
                 .path(defaultPath)
@@ -105,6 +107,7 @@
         assertThat(intent1.treatment(), equalTo(intent2.treatment()));
         assertThat(intent1.priority(), is(PRIORITY));
         assertThat(intent1.path(), is(defaultPath));
+        assertThat(intent1.key(), equalTo(KEY1));
     }
 
 }
diff --git a/core/api/src/test/java/org/onosproject/net/intent/PathIntentTest.java b/core/api/src/test/java/org/onosproject/net/intent/PathIntentTest.java
index dfbc184..9e67534 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/PathIntentTest.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/PathIntentTest.java
@@ -62,12 +62,14 @@
         assertEquals("incorrect match", MATCH, intent.selector());
         assertEquals("incorrect action", NOP, intent.treatment());
         assertEquals("incorrect path", PATH1, intent.path());
+        assertEquals("incorrect key", KEY, intent.key());
     }
 
     @Override
     protected PathIntent createOne() {
         return PathIntent.builder()
                 .appId(APPID)
+                .key(KEY)
                 .selector(MATCH)
                 .treatment(NOP)
                 .path(PATH1)