diff --git a/core/Changes b/core/Changes
index 29195ff..5b04a5e 100644
--- a/core/Changes
+++ b/core/Changes
@@ -16,6 +16,8 @@
    - Removed codes related to user registration & password management (margaretha)  
 22/01/2019
    - Added create, edit, retrieve user default setting controllers (margaretha)
+24/01/2019
+   - Added default setting key validation & fixed UserdataTest (margaretha)   
 
 
 version 0.61.4
diff --git a/full/Changes b/full/Changes
index 6b41749..fe15ea8 100644
--- a/full/Changes
+++ b/full/Changes
@@ -27,6 +27,10 @@
 23/01/2019
    - Added default setting key validation (margaretha)
    - Fixed UserdataTest (margaretha) 
+24/01/2019
+   - Added default setting key validation & fixed UserdataTest (margaretha)
+25/01/2019   
+   - Added VC reference and MapUtil tests (margaretha)  
 
 # version 0.61.4
 14/11/2018
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/utils/MapUtils.java b/full/src/main/java/de/ids_mannheim/korap/web/utils/MapUtils.java
index b4d9266..7d1913f 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/utils/MapUtils.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/utils/MapUtils.java
@@ -8,25 +8,31 @@
 
 import javax.ws.rs.core.MultivaluedMap;
 
-/** Utility methods for maps
+/**
+ * Utility methods for maps
  * 
  * @author margaretha
  *
  */
 public class MapUtils {
 
-    /** Converts {@link MultivaluedMap} to {@link Map}
+    /**
+     * Converts {@link MultivaluedMap} to {@link Map}
      * 
      * @param multivaluedMap
      * @return
      */
     public static Map<String, String> toMap (
             MultivaluedMap<String, String> multivaluedMap) {
+
+        if (multivaluedMap == null) {
+            return new HashMap<String, String>();
+        }
         
         Set<String> keySet = multivaluedMap.keySet();
         Map<String, String> map = new HashMap<String, String>(keySet.size());
-        
-        for (String key :  keySet){
+
+        for (String key : keySet) {
             List<String> values = multivaluedMap.get(key);
             String value = values.stream().collect(Collectors.joining(" "));
             map.put(key, value);
diff --git a/full/src/test/java/de/ids_mannheim/korap/misc/MapUtilsTest.java b/full/src/test/java/de/ids_mannheim/korap/misc/MapUtilsTest.java
new file mode 100644
index 0000000..e95615a
--- /dev/null
+++ b/full/src/test/java/de/ids_mannheim/korap/misc/MapUtilsTest.java
@@ -0,0 +1,44 @@
+package de.ids_mannheim.korap.misc;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Map;
+
+import javax.ws.rs.core.MultivaluedHashMap;
+import javax.ws.rs.core.MultivaluedMap;
+
+import org.junit.Test;
+
+import de.ids_mannheim.korap.web.utils.MapUtils;
+import edu.emory.mathcs.backport.java.util.Arrays;
+
+public class MapUtilsTest {
+
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testConvertToMap () {
+        MultivaluedMap<String, String> mm =
+                new MultivaluedHashMap<String, String>();
+        mm.put("k1", Arrays.asList(new String[] { "a", "b", "c" }));
+        mm.put("k2", Arrays.asList(new String[] { "d", "e", "f" }));
+
+        Map<String, String> map = MapUtils.toMap(mm);
+        assertEquals("a b c", map.get("k1"));
+        assertEquals("d e f", map.get("k2"));
+    }
+
+    @Test
+    public void testConvertNullMap () {
+        Map<String, String> map = MapUtils.toMap(null);
+        assertEquals(0, map.size());
+    }
+
+    @Test
+    public void testConvertEmptyMap () {
+        MultivaluedMap<String, String> mm =
+                new MultivaluedHashMap<String, String>();
+        Map<String, String> map = MapUtils.toMap(mm);
+        assertEquals(0, map.size());
+    }
+
+}
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/VCReferenceTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/VCReferenceTest.java
index 997da1a..59b4d9a 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/VCReferenceTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/VCReferenceTest.java
@@ -17,6 +17,7 @@
 import de.ids_mannheim.korap.dao.VirtualCorpusDao;
 import de.ids_mannheim.korap.entity.VirtualCorpus;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.exceptions.StatusCodes;
 import de.ids_mannheim.korap.util.QueryException;
 import de.ids_mannheim.korap.utils.JsonUtils;
 import net.sf.ehcache.CacheManager;
@@ -29,7 +30,7 @@
     private VirtualCorpusDao dao;
 
     @Test
-    public void testVCRef ()
+    public void testRefPredefinedVC ()
             throws KustvaktException, IOException, QueryException {
         testSearchWithoutVCRefOr();
         testSearchWithoutVCRefAnd();
@@ -109,4 +110,32 @@
         JsonNode node = JsonUtils.readTree(ent);
         assertEquals(2, node.at("/documents").asInt());
     }
+
+    @Test
+    public void testRefVCNotExist () throws KustvaktException {
+        ClientResponse response = resource().path(API_VERSION).path("search")
+                .queryParam("q", "[orth=der]").queryParam("ql", "poliqarp")
+                .queryParam("cq", "referTo \"username/vc1\"")
+                .get(ClientResponse.class);
+
+        String ent = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(ent);
+        assertEquals(StatusCodes.NO_RESULT_FOUND,
+                node.at("/errors/0/0").asInt());
+        assertEquals("username/vc1", node.at("/errors/0/2").asText());
+    }
+
+    @Test
+    public void testRefNotAuthorized() throws KustvaktException {
+        ClientResponse response = resource().path(API_VERSION).path("search")
+                .queryParam("q", "[orth=der]").queryParam("ql", "poliqarp")
+                .queryParam("cq", "referTo \"dory/dory VC\"")
+                .get(ClientResponse.class);
+
+        String ent = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(ent);
+        assertEquals(StatusCodes.AUTHORIZATION_FAILED,
+                node.at("/errors/0/0").asInt());
+        assertEquals("guest", node.at("/errors/0/2").asText());
+    }
 }
