diff --git a/core/Changes b/core/Changes
index 1b78700..02f361e 100644
--- a/core/Changes
+++ b/core/Changes
@@ -3,6 +3,8 @@
    - Removed log4j loader and old OAuth2 implementation codes(margaretha)
 13/09/2018
    - Updated KoralNode and enforced order of RewriteTask (margaretha)
+14/09/2018
+   - Added a status code for nonunique results (margaretha)
     
 version 0.61.1
 28/08/2018
diff --git a/core/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java b/core/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java
index 1194bd9..ec2a148 100644
--- a/core/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java
+++ b/core/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java
@@ -26,6 +26,7 @@
     public static final int HTTPS_REQUIRED = 110;
     public static final int INVALID_ALGORITHM = 111;
     public static final int UNSUPPORTED_API_VERSION = 112;
+    public static final int NON_UNIQUE_RESULT_FOUND = 113;
     
     /**
      * 200 status codes general JSON serialization error
diff --git a/full/Changes b/full/Changes
index 252191b..b81509d 100644
--- a/full/Changes
+++ b/full/Changes
@@ -3,6 +3,10 @@
     - Added various log4j2 configurations (margaretha)
 13/09/2018
     - Implemented VirtualCorpusRewrite (margaretha)
+14/09/2018
+    - Fixed SpringJerseyTest ApplicationContext (margaretha)
+    - Handled VCRef with username in VirtualCorpusRewrite (margaretha)
+    - Enabled VCReferenceTest in maven test suite (margaretha)
 
 # version 0.61.1
 28/08/2018
diff --git a/full/pom.xml b/full/pom.xml
index 9a40701..6d851a0 100644
--- a/full/pom.xml
+++ b/full/pom.xml
@@ -3,7 +3,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>de.ids_mannheim.korap</groupId>
 	<artifactId>Kustvakt-full</artifactId>
-	<version>0.61.1</version>
+	<version>0.61.2</version>
 	<properties>
 		<java.version>1.8</java.version>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
diff --git a/full/src/main/java/de/ids_mannheim/korap/config/NamedVCLoader.java b/full/src/main/java/de/ids_mannheim/korap/config/NamedVCLoader.java
index 4bee9be..fc86f52 100644
--- a/full/src/main/java/de/ids_mannheim/korap/config/NamedVCLoader.java
+++ b/full/src/main/java/de/ids_mannheim/korap/config/NamedVCLoader.java
@@ -3,9 +3,11 @@
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.util.zip.GZIPInputStream;
 
 import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.output.ByteArrayOutputStream;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
@@ -32,10 +34,22 @@
     private VirtualCorpusDao vcDao;
     @Autowired
     private VirtualCorpusService vcService;
-    
+
     private static Logger jlog = LogManager.getLogger(NamedVCLoader.class);
 
-    public void loadVCToCache () throws IOException, QueryException, KustvaktException {
+    public void loadVCToCache (String filename, String filePath)
+            throws IOException, QueryException, KustvaktException {
+
+        InputStream is = NamedVCLoader.class.getResourceAsStream(filePath);
+        String json = IOUtils.toString(is, "utf-8");
+        if (json != null) {
+            cacheVC(json, filename);
+            storeVC(filename, json);
+        }
+    }
+
+    public void loadVCToCache ()
+            throws IOException, QueryException, KustvaktException {
 
         String dir = config.getNamedVCPath();
         File d = new File(dir);
@@ -48,45 +62,45 @@
                 throw new IOException("File " + file + " is not found.");
             }
 
-            long start, end;
-            String json;
             String filename = file.getName();
-
-            if (file.getName().endsWith(".jsonld")) {
-                filename = filename.substring(0, filename.length() - 7);
-                start = System.currentTimeMillis();
-                json = FileUtils.readFileToString(file, "utf-8");
-                end = System.currentTimeMillis();
+            String json = readFile(file, filename);
+            if (json != null) {
+                cacheVC(json, filename);
+                storeVC(filename, json);
             }
-            else if (filename.endsWith(".jsonld.gz")) {
-                filename = filename.substring(0, filename.length() - 10);
-                start = System.currentTimeMillis();
-
-                GZIPInputStream gzipInputStream =
-                        new GZIPInputStream(new FileInputStream(file));
-                ByteArrayOutputStream bos = new ByteArrayOutputStream(512);
-                bos.write(gzipInputStream);
-                json = bos.toString("utf-8");
-                bos.close();
-                end = System.currentTimeMillis();
-            }
-            else {
-                System.err.println("File " + filename
-                        + " is not allowed. Filename must ends with .jsonld or .jsonld.gz");
-                continue;
-            }
-            jlog.debug(
-                    "READ " + filename + " duration: " + (end - start));
-
-            cacheVC(json, filename);
-            storeVC(filename, json);
         }
     }
-    
-    private void cacheVC (String json, String filename) throws IOException, QueryException {
+
+    private String readFile (File file, String filename) throws IOException {
+        String json = null;
+        long start = System.currentTimeMillis();
+        if (filename.endsWith(".jsonld")) {
+            filename = filename.substring(0, filename.length() - 7);
+            json = FileUtils.readFileToString(file, "utf-8");
+        }
+        else if (filename.endsWith(".jsonld.gz")) {
+            filename = filename.substring(0, filename.length() - 10);
+            GZIPInputStream gzipInputStream =
+                    new GZIPInputStream(new FileInputStream(file));
+            ByteArrayOutputStream bos = new ByteArrayOutputStream(512);
+            bos.write(gzipInputStream);
+            json = bos.toString("utf-8");
+            bos.close();
+        }
+        else {
+            System.err.println("File " + filename
+                    + " is not allowed. Filename must ends with .jsonld or .jsonld.gz");
+        }
+        long end = System.currentTimeMillis();
+        jlog.debug("READ " + filename + " duration: " + (end - start));
+        return json;
+    }
+
+    private void cacheVC (String json, String filename)
+            throws IOException, QueryException {
         long start, end;
         start = System.currentTimeMillis();
-        
+
         KrillCollection collection = new KrillCollection(json);
         collection.setIndex(searchKrill.getIndex());
 
@@ -99,16 +113,17 @@
                 + KrillCollection.cache.calculateInMemorySize());
     }
 
-    private void storeVC (String name, String koralQuery) throws KustvaktException {
+    private void storeVC (String name, String koralQuery)
+            throws KustvaktException {
         if (!VirtualCorpusService.wordPattern.matcher(name).matches()) {
             throw new KustvaktException(StatusCodes.INVALID_ARGUMENT,
                     "Virtual corpus name must only contains letters, numbers, "
                             + "underscores, hypens and spaces",
                     name);
         }
-        CorpusAccess requiredAccess = vcService.determineRequiredAccess(koralQuery);
+        CorpusAccess requiredAccess =
+                vcService.determineRequiredAccess(koralQuery);
         vcDao.createVirtualCorpus(name, VirtualCorpusType.SYSTEM,
-                requiredAccess, koralQuery, null,
-                null, null, true, "system");
+                requiredAccess, koralQuery, null, null, null, true, "system");
     }
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/dao/VirtualCorpusDao.java b/full/src/main/java/de/ids_mannheim/korap/dao/VirtualCorpusDao.java
index c8006aa..ab4fbb8 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dao/VirtualCorpusDao.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dao/VirtualCorpusDao.java
@@ -8,6 +8,7 @@
 
 import javax.persistence.EntityManager;
 import javax.persistence.NoResultException;
+import javax.persistence.NonUniqueResultException;
 import javax.persistence.PersistenceContext;
 import javax.persistence.Query;
 import javax.persistence.criteria.CriteriaBuilder;
@@ -211,6 +212,13 @@
                             + vcCode,
                     String.valueOf(vcCode), e);
         }
+        catch (NonUniqueResultException e) {
+            String vcCode = createdBy + "/" + vcName;
+            throw new KustvaktException(StatusCodes.NON_UNIQUE_RESULT_FOUND,
+                    "Non unique result found for query: retrieve virtual corpus by name "
+                            + vcCode,
+                    String.valueOf(vcCode), e);
+        }
         return vc;
     }
 
diff --git a/full/src/main/java/de/ids_mannheim/korap/rewrite/VirtualCorpusRewrite.java b/full/src/main/java/de/ids_mannheim/korap/rewrite/VirtualCorpusRewrite.java
index ef7ec7d..86d11c5 100644
--- a/full/src/main/java/de/ids_mannheim/korap/rewrite/VirtualCorpusRewrite.java
+++ b/full/src/main/java/de/ids_mannheim/korap/rewrite/VirtualCorpusRewrite.java
@@ -14,6 +14,7 @@
 import de.ids_mannheim.korap.resource.rewrite.RewriteTask;
 import de.ids_mannheim.korap.service.VirtualCorpusService;
 import de.ids_mannheim.korap.user.User;
+import de.ids_mannheim.korap.util.StatusCodes;
 import de.ids_mannheim.korap.utils.JsonUtils;
 
 @Component
@@ -36,24 +37,24 @@
         if (koralNode.has("@type")
                 && koralNode.get("@type").equals("koral:docGroupRef")) {
             if (!koralNode.has("ref")) {
-                // throw error
+                throw new KustvaktException(StatusCodes.MISSING_VC_REFERENCE,
+                        "ref is not found");
             }
             else {
                 String vcName = koralNode.get("ref");
+                String vcOwner = "system";
+                if (vcName.contains("/")) {
+                    String[] names = vcName.split("/");
+                    if (names.length == 2) {
+                        vcOwner = names[0];
+                        vcName = names[1];
+                    }
+                }
 
                 VirtualCorpus vc =
-                        vcService.searchVCByName(username, vcName, "system");
+                        vcService.searchVCByName(username, vcName, vcOwner);
                 if (!vc.isCached()) {
-                    String koralQuery = vc.getKoralQuery();
-                    JsonNode kq =
-                            JsonUtils.readTree(koralQuery).at("/collection");
-                    JsonNode jsonNode = koralNode.rawNode();
-                    // rewrite
-                    koralNode.remove("@type", new RewriteIdentifier("@type",
-                            jsonNode.at("/@type").asText()));
-                    koralNode.remove("ref", new RewriteIdentifier("ref",
-                            jsonNode.at("/ref").asText()));
-                    koralNode.setAll((ObjectNode) kq);
+                    rewriteVC(vc, koralNode);
                 }
             }
 
@@ -69,4 +70,17 @@
 
         }
     }
+
+    private void rewriteVC (VirtualCorpus vc, KoralNode koralNode)
+            throws KustvaktException {
+        String koralQuery = vc.getKoralQuery();
+        JsonNode kq = JsonUtils.readTree(koralQuery).at("/collection");
+        JsonNode jsonNode = koralNode.rawNode();
+        // rewrite
+        koralNode.remove("@type",
+                new RewriteIdentifier("@type", jsonNode.at("/@type").asText()));
+        koralNode.remove("ref",
+                new RewriteIdentifier("ref", jsonNode.at("/ref").asText()));
+        koralNode.setAll((ObjectNode) kq);
+    }
 }
diff --git a/full/src/test/java/de/ids_mannheim/korap/config/NamedVCLoaderTest.java b/full/src/test/java/de/ids_mannheim/korap/config/NamedVCLoaderTest.java
index b5b218a..3fef08f 100644
--- a/full/src/test/java/de/ids_mannheim/korap/config/NamedVCLoaderTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/config/NamedVCLoaderTest.java
@@ -10,26 +10,36 @@
 
 import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.collection.CachedVCData;
+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.util.QueryException;
+import net.sf.ehcache.CacheManager;
 import net.sf.ehcache.Element;
 
-public class NamedVCLoaderTest extends SpringJerseyTest{
+public class NamedVCLoaderTest extends SpringJerseyTest {
 
     @Autowired
     private NamedVCLoader vcLoader;
-    
-    
+    @Autowired
+    private VirtualCorpusDao dao;
+
     @Test
-    public void testNamedVCLoader () throws IOException, QueryException, KustvaktException {
+    public void testNamedVCLoader ()
+            throws IOException, QueryException, KustvaktException {
+        KrillCollection.cache = CacheManager.newInstance().getCache("named_vc");
         Element element = KrillCollection.cache.get("named-vc1");
-        assertTrue(element==null);
-        
-        vcLoader.loadVCToCache();
+        assertTrue(element == null);
+
+        vcLoader.loadVCToCache("named-vc1", "/vc/named-vc1.jsonld");
 
         element = KrillCollection.cache.get("named-vc1");
         assertNotNull(element);
         CachedVCData cachedData = (CachedVCData) element.getObjectValue();
         assertTrue(cachedData.getDocIdMap().size() > 0);
+        
+        KrillCollection.cache.removeAll();
+        VirtualCorpus vc = dao.retrieveVCByName("named-vc1", "system");
+        dao.deleteVirtualCorpus(vc);
     }
 }
diff --git a/full/src/test/java/de/ids_mannheim/korap/config/SpringJerseyTest.java b/full/src/test/java/de/ids_mannheim/korap/config/SpringJerseyTest.java
index 36902b4..959dce2 100644
--- a/full/src/test/java/de/ids_mannheim/korap/config/SpringJerseyTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/config/SpringJerseyTest.java
@@ -5,14 +5,11 @@
 import java.util.concurrent.ThreadLocalRandom;
 
 import org.junit.runner.RunWith;
-import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
-import org.springframework.beans.factory.support.DefaultListableBeanFactory;
 import org.springframework.context.support.GenericApplicationContext;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.web.context.support.AbstractRefreshableWebApplicationContext;
+import org.springframework.web.context.support.GenericWebApplicationContext;
 
 import com.sun.jersey.spi.spring.container.servlet.SpringServlet;
 import com.sun.jersey.test.framework.AppDescriptor;
@@ -27,7 +24,7 @@
 public abstract class SpringJerseyTest extends JerseyTest {
 
     public final static String API_VERSION = "v1.0";
-    
+
     @Autowired
     protected GenericApplicationContext applicationContext;
 
@@ -36,7 +33,6 @@
                     "de.ids_mannheim.korap.web.filter",
                     "de.ids_mannheim.korap.web.utils" };
 
-
     @Override
     protected TestContainerFactory getTestContainerFactory ()
             throws TestContainerException {
@@ -46,27 +42,13 @@
     @Override
     public void setUp () throws Exception {
 
-        StaticContextLoaderListener.applicationContext =
-                new AbstractRefreshableWebApplicationContext() {
+        GenericWebApplicationContext genericContext =
+                new GenericWebApplicationContext();
 
-                    ConfigurableListableBeanFactory existingBeanFactory =
-                            applicationContext.getBeanFactory();
+        genericContext.setParent(this.applicationContext);
+        genericContext.setClassLoader(this.applicationContext.getClassLoader());
 
-                    @Override
-                    protected void loadBeanDefinitions (
-                            DefaultListableBeanFactory beanFactory)
-                            throws BeansException, IOException {
-
-                        String[] beanDefinitionNames =
-                                existingBeanFactory.getBeanDefinitionNames();
-                        for (String beanName : beanDefinitionNames) {
-                            beanFactory.registerBeanDefinition(beanName,
-                                    existingBeanFactory
-                                            .getBeanDefinition(beanName));
-                        }
-                    }
-                };
-
+        StaticContextLoaderListener.applicationContext = genericContext;
         super.setUp();
     }
 
@@ -80,7 +62,7 @@
                 // "classpath:test-config.xml")
                 .build();
     }
-    
+
     @Override
     protected int getPort (int defaultPort) {
         int port = ThreadLocalRandom.current().nextInt(5000, 8000 + 1);
diff --git a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/VirtualCorpusRewriteTest.java b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/VirtualCorpusRewriteTest.java
index a388ae1..04931d8 100644
--- a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/VirtualCorpusRewriteTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/VirtualCorpusRewriteTest.java
@@ -1,18 +1,28 @@
 package de.ids_mannheim.korap.resource.rewrite;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
 
 import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.google.common.net.HttpHeaders;
 import com.sun.jersey.api.client.ClientResponse;
 
+import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.authentication.http.HttpAuthorizationHandler;
 import de.ids_mannheim.korap.config.Attributes;
+import de.ids_mannheim.korap.config.NamedVCLoader;
 import de.ids_mannheim.korap.config.SpringJerseyTest;
+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.util.QueryException;
 import de.ids_mannheim.korap.utils.JsonUtils;
+import net.sf.ehcache.CacheManager;
 
 /**
  * @author margaretha
@@ -20,8 +30,36 @@
  */
 public class VirtualCorpusRewriteTest extends SpringJerseyTest {
 
+    @Autowired
+    private NamedVCLoader vcLoader;
+    @Autowired
+    private VirtualCorpusDao dao;
+    
     @Test
-    public void testSearchFreeWithVCRef () throws KustvaktException {
+    public void testNoRewriteWithCachedVCRef ()
+            throws KustvaktException, IOException, QueryException {
+        KrillCollection.cache = CacheManager.newInstance().getCache("named_vc");
+        vcLoader.loadVCToCache("named-vc1", "/vc/named-vc1.jsonld");
+
+        ClientResponse response = resource().path(API_VERSION).path("search")
+                .queryParam("q", "[orth=der]").queryParam("ql", "poliqarp")
+                .queryParam("cq", "referTo named-vc1")
+                .get(ClientResponse.class);
+
+        String ent = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(ent);
+        node = node.at("/collection");
+
+        assertEquals("koral:docGroup", node.at("/@type").asText());
+        assertTrue(node.at("/operands/1/rewrites").isMissingNode());
+        
+        KrillCollection.cache.removeAll();
+        VirtualCorpus vc = dao.retrieveVCByName("named-vc1", "system");
+        dao.deleteVirtualCorpus(vc);
+    }
+    
+    @Test
+    public void testRewriteFreeAndSystemVCRef () throws KustvaktException, Exception {
         ClientResponse response = resource().path(API_VERSION).path("search")
                 .queryParam("q", "[orth=der]").queryParam("ql", "poliqarp")
                 .queryParam("cq", "referTo \"system VC\"")
@@ -32,18 +70,24 @@
         node = node.at("/collection");
 
         assertEquals("koral:docGroup", node.at("/@type").asText());
-        assertEquals(3, node.at("/operands/1/rewrites").size());
+        assertEquals("koral:doc", node.at("/operands/0/@type").asText());
+        
+        assertEquals("koral:doc", node.at("/operands/1/@type").asText());
+        assertEquals("GOE", node.at("/operands/1/value").asText());
+        assertEquals("corpusSigle", node.at("/operands/1/key").asText());
+
         node = node.at("/operands/1/rewrites");
+        assertEquals(3, node.size());
         assertEquals("operation:deletion", node.at("/0/operation").asText());
         assertEquals("operation:deletion", node.at("/1/operation").asText());
         assertEquals("operation:insertion", node.at("/2/operation").asText());
     }
 
     @Test
-    public void testSearchPubWithVCRef () throws KustvaktException {
+    public void testRewritePubAndSystemVCRef () throws KustvaktException {
         ClientResponse response = resource().path(API_VERSION).path("search")
                 .queryParam("q", "[orth=der]").queryParam("ql", "poliqarp")
-                .queryParam("cq", "referTo \"system VC\"")
+                .queryParam("cq", "referTo \"system/system VC\"")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue("user", "pass"))
                 .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
@@ -54,9 +98,31 @@
         node = node.at("/collection");
         assertEquals("koral:docGroup", node.at("/@type").asText());
         assertEquals("koral:docGroup", node.at("/operands/0/@type").asText());
-        assertEquals(3, node.at("/operands/1/rewrites").size());
-        assertEquals("koral:doc", node.at("/operands/1/@type").asText());
-        assertEquals("GOE", node.at("/operands/1/value").asText());
-        assertEquals("corpusSigle", node.at("/operands/1/key").asText());
+        
+        node = node.at("/operands/1/rewrites");
+        assertEquals(3, node.size());
+        assertEquals("operation:deletion", node.at("/0/operation").asText());
+        assertEquals("operation:deletion", node.at("/1/operation").asText());
+        assertEquals("operation:insertion", node.at("/2/operation").asText());
+    }
+
+    @Test
+    public void testRewriteWithDoryVCRef ()
+            throws KustvaktException, IOException, QueryException {
+
+        ClientResponse response = resource().path(API_VERSION).path("search")
+                .queryParam("q", "Fisch").queryParam("ql", "poliqarp")
+                .queryParam("cq", "referTo \"dory/dory VC\"")
+                .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
+                        .createBasicAuthorizationHeaderValue("dory", "pass"))
+                .get(ClientResponse.class);
+
+        String ent = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(ent);
+        node = node.at("/collection");
+//        System.out.println(node);
+        assertEquals("koral:docGroup", node.at("/@type").asText());
+        node = node.at("/operands/1/rewrites");
+        assertEquals(3, node.size());
     }
 }
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2ClientControllerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2ClientControllerTest.java
index c7f06e1..1c59d76 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2ClientControllerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2ClientControllerTest.java
@@ -382,6 +382,8 @@
 
         testAccessTokenAfterUpgradingClient(clientId, accessToken);
         testAccessTokenAfterDegradingSuperClient(clientId, accessToken);
+        
+        testDeregisterConfidentialClient(clientId, clientSecret);
     }
 
     // old access tokens retain their scopes
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 4ce02ff..55f289d 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
@@ -1,38 +1,56 @@
 package de.ids_mannheim.korap.web.controller;
 
 import static org.junit.Assert.assertEquals;
-
 import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 
-import org.junit.Ignore;
 import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.sun.jersey.api.client.ClientResponse;
 
+import de.ids_mannheim.korap.KrillCollection;
+import de.ids_mannheim.korap.config.NamedVCLoader;
 import de.ids_mannheim.korap.config.SpringJerseyTest;
+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.util.QueryException;
 import de.ids_mannheim.korap.utils.JsonUtils;
+import net.sf.ehcache.CacheManager;
 
 public class VCReferenceTest extends SpringJerseyTest {
 
-    // auto caching is disabled in krill
-    @Ignore
+    @Autowired
+    private NamedVCLoader vcLoader;
+    @Autowired
+    private VirtualCorpusDao dao;
+
     @Test
     public void testVCRef ()
             throws KustvaktException, IOException, QueryException {
         testSearchWithoutVCRefOr();
         testSearchWithoutVCRefAnd();
 
-        // auto caching
+        KrillCollection.cache = CacheManager.newInstance().getCache("named_vc");
+        vcLoader.loadVCToCache("named-vc1", "/vc/named-vc1.jsonld");
         testStatisticsWithVCReference();
+
+        // TODO: test auto-caching (disabled in krill)
+        vcLoader.loadVCToCache("named-vc2", "/vc/named-vc2.jsonld");
         testSearchWithVCRefNotEqual();
+
         // retrieve from cache
         testSearchWithVCRefEqual();
         testSearchWithVCRefNotEqual();
+
+        KrillCollection.cache.removeAll();
+        VirtualCorpus vc = dao.retrieveVCByName("named-vc1", "system");
+        dao.deleteVirtualCorpus(vc);
+        vc = dao.retrieveVCByName("named-vc2", "system");
+        dao.deleteVirtualCorpus(vc);
     }
 
     private void testSearchWithoutVCRefOr () throws KustvaktException {
diff --git a/full/src/test/resources/vc/named-vc1.jsonld b/full/src/test/resources/vc/named-vc1.jsonld
new file mode 100644
index 0000000..ec25031
--- /dev/null
+++ b/full/src/test/resources/vc/named-vc1.jsonld
@@ -0,0 +1,10 @@
+{"collection": {
+    "@type": "koral:doc",
+    "key": "textSigle",
+    "match": "match:eq",
+    "type" : "type:string",
+    "value": [
+        "GOE/AGF/00000",
+        "GOE/AGA/01784"
+    ]
+}}
diff --git a/full/src/test/resources/vc/named-vc2.jsonld b/full/src/test/resources/vc/named-vc2.jsonld
new file mode 100644
index 0000000..a79d6e5
--- /dev/null
+++ b/full/src/test/resources/vc/named-vc2.jsonld
@@ -0,0 +1,10 @@
+{"collection": {
+    "@type": "koral:doc",
+    "key": "textSigle",
+    "match": "match:ne",
+    "type" : "type:string",
+    "value": [
+        "GOE/AGI/04846",
+        "GOE/AGA/01784"
+    ]
+}}
