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());
+    }
 }
