Updating SimpleIntentStore

Change-Id: Ide940216f05a69875fcb844d36b073e2e4b9988e
diff --git a/core/net/pom.xml b/core/net/pom.xml
index 2bc6a60..27ca1a8 100644
--- a/core/net/pom.xml
+++ b/core/net/pom.xml
@@ -51,6 +51,14 @@
             <scope>test</scope>
         </dependency>
 
+        <!-- FIXME remove when we figure out the trivial store -->
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-core-dist</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+
         <dependency>
             <groupId>org.onosproject</groupId>
             <artifactId>onos-core-common</artifactId>
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java
index 76acae4..776f52a 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java
@@ -48,7 +48,7 @@
 import org.onosproject.net.intent.IntentTestsMocks;
 import org.onosproject.net.intent.Key;
 import org.onosproject.net.resource.LinkResourceAllocations;
-import org.onosproject.store.trivial.impl.SimpleIntentStore;
+import org.onosproject.store.intent.impl.SimpleIntentStore;
 
 import java.util.Collection;
 import java.util.Collections;
diff --git a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/SimpleIntentStore.java b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/SimpleIntentStore.java
index c1e6103..1f255c6 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/SimpleIntentStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/SimpleIntentStore.java
@@ -170,6 +170,7 @@
                     // current version is less than or equal to newData's
                     // Note: current and newData's versions will be equal for state updates
                     currentData.version().compareTo(newData.version()) <= 0) {
+                // FIXME need to check that the validity of state transition if ==
                 current.put(newData.key(), newData);
 
                 if (pendingData != null
@@ -204,7 +205,9 @@
 
     @Override
     public void addPending(IntentData data) {
-        data.setVersion(new SystemClockTimestamp());
+        if (data.version() != null) { // recompiled intents will already have a version
+            data.setVersion(new SystemClockTimestamp());
+        }
         synchronized (this) {
             IntentData existingData = pending.get(data.key());
             if (existingData == null ||