Fix bug that exception is thrown when key doesn't exist

Change-Id: Ic107b82202f64fb81709310b5e9a705c7e66d542
diff --git a/core/store/dist/src/main/java/org/onosproject/store/newresource/impl/ConsistentResourceStore.java b/core/store/dist/src/main/java/org/onosproject/store/newresource/impl/ConsistentResourceStore.java
index 82dfe32..386d9dd 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/newresource/impl/ConsistentResourceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/newresource/impl/ConsistentResourceStore.java
@@ -294,7 +294,8 @@
     private <K, V> boolean appendValues(TransactionalMap<K, List<V>> map, K key, List<V> values) {
         List<V> oldValues = map.get(key);
         if (oldValues == null) {
-            return map.replace(key, oldValues, new ArrayList<>(values));
+            map.put(key, new ArrayList<>(values));
+            return true;
         }
 
         LinkedHashSet<V> oldSet = new LinkedHashSet<>(oldValues);
@@ -321,7 +322,8 @@
     private <K, V> boolean removeValues(TransactionalMap<K, List<V>> map, K key, List<V> values) {
         List<V> oldValues = map.get(key);
         if (oldValues == null) {
-            return map.replace(key, oldValues, new ArrayList<>());
+            map.put(key, new ArrayList<>());
+            return true;
         }
 
         LinkedHashSet<V> oldSet = new LinkedHashSet<>(oldValues);