diff --git a/full/src/main/java/de/ids_mannheim/korap/constant/PredefinedUserGroup.java b/full/src/main/java/de/ids_mannheim/korap/constant/PredefinedUserGroup.java
index 78b39cf..f218ac4 100644
--- a/full/src/main/java/de/ids_mannheim/korap/constant/PredefinedUserGroup.java
+++ b/full/src/main/java/de/ids_mannheim/korap/constant/PredefinedUserGroup.java
@@ -1,15 +1,21 @@
 package de.ids_mannheim.korap.constant;
 
 public enum PredefinedUserGroup {
-    ALL("all users");
+    ALL("all users", 1);
     
     private String value;
+    private int id;
 
-    PredefinedUserGroup (String value) {
+    PredefinedUserGroup (String value, int id) {
         this.value = value;
+        this.id = id;
     }
     
     public String getValue () {
         return value;
     }
+    
+    public int getId () {
+        return id;
+    }
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupDao.java b/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupDao.java
index a1f74e6..cb04594 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupDao.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupDao.java
@@ -20,6 +20,7 @@
 
 import de.ids_mannheim.korap.constant.GroupMemberStatus;
 import de.ids_mannheim.korap.constant.PredefinedRole;
+import de.ids_mannheim.korap.constant.PredefinedUserGroup;
 import de.ids_mannheim.korap.constant.UserGroupStatus;
 import de.ids_mannheim.korap.constant.VirtualCorpusAccessStatus;
 import de.ids_mannheim.korap.entity.Role;
@@ -39,8 +40,6 @@
 @Repository
 public class UserGroupDao {
 
-    public static final String USER_GROUP_ALL = "all";
-
     @PersistenceContext
     private EntityManager entityManager;
 
@@ -104,7 +103,20 @@
             throws KustvaktException {
         UserGroup group = retrieveGroupById(groupId);
         group.setName(name);
-        entityManager.persist(group);
+        entityManager.merge(group);
+    }
+
+    public UserGroup retrieveAllUserGroup () {
+        CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
+        CriteriaQuery<UserGroup> query =
+                criteriaBuilder.createQuery(UserGroup.class);
+
+        Root<UserGroup> root = query.from(UserGroup.class);
+        query.select(root);
+        query.where(criteriaBuilder.equal(root.get(UserGroup_.id),
+                PredefinedUserGroup.ALL.getId()));
+        Query q = entityManager.createQuery(query);
+        return (UserGroup) q.getSingleResult();
     }
 
     /** Retrieves the UserGroup by the given group id. This methods does not 
@@ -128,9 +140,8 @@
         query.where(criteriaBuilder.equal(root.get(UserGroup_.id), groupId));
         Query q = entityManager.createQuery(query);
 
-        UserGroup userGroup;
         try {
-            userGroup = (UserGroup) q.getSingleResult();
+            return (UserGroup) q.getSingleResult();
         }
         catch (NoResultException e) {
             throw new KustvaktException(StatusCodes.NO_RESULT_FOUND,
@@ -138,7 +149,6 @@
                             + groupId,
                     String.valueOf(groupId), e);
         }
-        return userGroup;
     }
 
     public UserGroup retrieveGroupWithMemberById (int groupId)
@@ -156,9 +166,8 @@
         query.where(criteriaBuilder.equal(root.get(UserGroup_.id), groupId));
         Query q = entityManager.createQuery(query);
 
-        UserGroup userGroup;
         try {
-            userGroup = (UserGroup) q.getSingleResult();
+            return (UserGroup) q.getSingleResult();
         }
         catch (NoResultException e) {
             throw new KustvaktException(StatusCodes.NO_RESULT_FOUND,
@@ -166,7 +175,6 @@
                             + groupId,
                     String.valueOf(groupId), e);
         }
-        return userGroup;
     }
 
     /** Retrieves only user-groups that are active (not hidden or deleted).
@@ -199,7 +207,18 @@
         query.select(root);
         query.where(restrictions);
         Query q = entityManager.createQuery(query);
-        return q.getResultList();
+
+        try {
+            return q.getResultList();
+        }
+        catch (NoResultException e) {
+            throw new KustvaktException(StatusCodes.NO_RESULT_FOUND,
+                    "No result found for query: retrieve group by used id "
+                            + userId,
+                    userId, e);
+        }
+
+
     }
 
     public UserGroup retrieveGroupByName (String groupName)
@@ -216,9 +235,8 @@
                 criteriaBuilder.equal(root.get(UserGroup_.name), groupName));
         Query q = entityManager.createQuery(query);
 
-        UserGroup userGroup;
         try {
-            userGroup = (UserGroup) q.getSingleResult();
+            return (UserGroup) q.getSingleResult();
         }
         catch (NoResultException e) {
             throw new KustvaktException(StatusCodes.NO_RESULT_FOUND,
@@ -226,7 +244,6 @@
                             + groupName,
                     groupName, e);
         }
-        return userGroup;
     }
 
     //    public void retrieveGroupByVCId (String vcId) {
diff --git a/full/src/main/java/de/ids_mannheim/korap/dao/VirtualCorpusAccessDao.java b/full/src/main/java/de/ids_mannheim/korap/dao/VirtualCorpusAccessDao.java
new file mode 100644
index 0000000..98e7990
--- /dev/null
+++ b/full/src/main/java/de/ids_mannheim/korap/dao/VirtualCorpusAccessDao.java
@@ -0,0 +1,106 @@
+package de.ids_mannheim.korap.dao;
+
+import java.util.List;
+
+import javax.persistence.EntityManager;
+import javax.persistence.NoResultException;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Join;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+
+import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Transactional;
+
+import de.ids_mannheim.korap.constant.VirtualCorpusAccessStatus;
+import de.ids_mannheim.korap.entity.UserGroup;
+import de.ids_mannheim.korap.entity.VirtualCorpus;
+import de.ids_mannheim.korap.entity.VirtualCorpusAccess;
+import de.ids_mannheim.korap.entity.VirtualCorpusAccess_;
+import de.ids_mannheim.korap.entity.VirtualCorpus_;
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.utils.ParameterChecker;
+
+@Transactional
+@Repository
+public class VirtualCorpusAccessDao {
+
+    @PersistenceContext
+    private EntityManager entityManager;
+
+    public List<VirtualCorpusAccess> retrieveAccessByVC (int vcId)
+            throws KustvaktException {
+        ParameterChecker.checkIntegerValue(vcId, "vcId");
+
+        CriteriaBuilder builder = entityManager.getCriteriaBuilder();
+        CriteriaQuery<VirtualCorpusAccess> query =
+                builder.createQuery(VirtualCorpusAccess.class);
+
+        Root<VirtualCorpusAccess> access =
+                query.from(VirtualCorpusAccess.class);
+        Join<VirtualCorpusAccess, VirtualCorpus> accessVC =
+                access.join(VirtualCorpusAccess_.virtualCorpus);
+
+        query.select(access);
+        query.where(builder.equal(accessVC.get(VirtualCorpus_.id), vcId));
+        Query q = entityManager.createQuery(query);
+        return q.getResultList();
+    }
+
+    /** Hidden accesses are only created for published or system VC. 
+     * 
+     * Warn: The actual hidden accesses are not checked.
+     * 
+     * @param vcId vcId 
+     * @return true if there is a hidden access, false otherwise
+     * @throws KustvaktException
+     */
+    public boolean hasHiddenAccess (int vcId) throws KustvaktException {
+        ParameterChecker.checkIntegerValue(vcId, "vcId");
+
+        CriteriaBuilder builder = entityManager.getCriteriaBuilder();
+        CriteriaQuery<VirtualCorpusAccess> query =
+                builder.createQuery(VirtualCorpusAccess.class);
+
+        Root<VirtualCorpusAccess> access =
+                query.from(VirtualCorpusAccess.class);
+        Join<VirtualCorpusAccess, VirtualCorpus> accessVC =
+                access.join(VirtualCorpusAccess_.virtualCorpus);
+
+        Predicate p = builder.and(
+                builder.equal(accessVC.get(VirtualCorpus_.id), vcId),
+                builder.equal(access.get(VirtualCorpusAccess_.status),
+                        VirtualCorpusAccessStatus.HIDDEN),
+                builder.notEqual(access.get(VirtualCorpusAccess_.deletedBy),
+                        "NULL"));
+
+        query.select(access);
+        query.where(p);
+        try {
+            Query q = entityManager.createQuery(query);
+            List<VirtualCorpusAccess> resultList = q.getResultList();
+            if (resultList.isEmpty()) {
+                return false;
+            }
+            else {
+                return true;
+            }
+        }
+        catch (NoResultException e) {
+            return false;
+        }
+    }
+
+    public void addAccessToVC (VirtualCorpus virtualCorpus, UserGroup userGroup,
+            String createdBy, VirtualCorpusAccessStatus status) {
+        VirtualCorpusAccess vca = new VirtualCorpusAccess();
+        vca.setVirtualCorpus(virtualCorpus);
+        vca.setUserGroup(userGroup);
+        vca.setCreatedBy(createdBy);
+        vca.setStatus(status);
+        entityManager.persist(vca);
+    }
+}
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 936c56f..a7690d7 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
@@ -11,7 +11,6 @@
 import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Join;
-import javax.persistence.criteria.ListJoin;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
 
@@ -49,7 +48,7 @@
     private EntityManager entityManager;
 
     public int createVirtualCorpus (String name, VirtualCorpusType type,
-            CorpusAccess requiredAccess, String collectionQuery,
+            CorpusAccess requiredAccess, String corpusQuery,
             String definition, String description, String status,
             String createdBy) throws KustvaktException {
 
@@ -57,7 +56,7 @@
         vc.setName(name);
         vc.setType(type);
         vc.setRequiredAccess(requiredAccess);
-        vc.setCollectionQuery(collectionQuery);
+        vc.setCorpusQuery(corpusQuery);
         vc.setDefinition(definition);
         vc.setDescription(description);
         vc.setStatus(status);
@@ -69,7 +68,7 @@
 
     public void editVirtualCorpus (VirtualCorpus vc, String name,
             VirtualCorpusType type, CorpusAccess requiredAccess,
-            String collectionQuery, String definition, String description,
+            String corpusQuery, String definition, String description,
             String status) throws KustvaktException {
 
         if (name != null && !name.isEmpty()) {
@@ -81,8 +80,8 @@
         if (requiredAccess != null) {
             vc.setRequiredAccess(requiredAccess);
         }
-        if (collectionQuery != null) {
-            vc.setCollectionQuery(collectionQuery);
+        if (corpusQuery != null) {
+            vc.setCorpusQuery(corpusQuery);
         }
         if (definition != null && !definition.isEmpty()) {
             vc.setDefinition(definition);
@@ -101,6 +100,7 @@
         entityManager.remove(vc);
     }
 
+    // for admins
     public List<VirtualCorpus> retrieveVCByType (VirtualCorpusType type)
             throws KustvaktException {
         ParameterChecker.checkObjectValue(type, "type");
@@ -116,7 +116,6 @@
         return q.getResultList();
     }
 
-
     public VirtualCorpus retrieveVCById (int id) throws KustvaktException {
         ParameterChecker.checkIntegerValue(id, "id");
 
@@ -142,8 +141,7 @@
         return vc;
     }
 
-
-    public List<VirtualCorpus> retrievePrivateVC (String userId)
+    public List<VirtualCorpus> retrieveOwnerVC (String userId)
             throws KustvaktException {
         ParameterChecker.checkStringValue(userId, "userId");
 
@@ -159,7 +157,29 @@
         Query q = entityManager.createQuery(query);
         return q.getResultList();
     }
+    
+    public List<VirtualCorpus> retrieveOwnerVCByType (String userId, VirtualCorpusType type)
+            throws KustvaktException {
+        ParameterChecker.checkStringValue(userId, "userId");
 
+        CriteriaBuilder builder = entityManager.getCriteriaBuilder();
+        CriteriaQuery<VirtualCorpus> query =
+                builder.createQuery(VirtualCorpus.class);
+
+        Root<VirtualCorpus> virtualCorpus = query.from(VirtualCorpus.class);
+        query.select(virtualCorpus);
+        
+        Predicate p = builder.and(
+                builder.equal(virtualCorpus.get(VirtualCorpus_.createdBy),
+                        userId),
+                builder.equal(virtualCorpus.get(VirtualCorpus_.type),
+                        type)
+                );
+        query.where(p);
+
+        Query q = entityManager.createQuery(query);
+        return q.getResultList();
+    }
 
     public List<VirtualCorpus> retrieveGroupVCByUser (String userId)
             throws KustvaktException {
@@ -199,7 +219,6 @@
         return q.getResultList();
     }
 
-
     public Set<VirtualCorpus> retrieveVCByUser (String userId)
             throws KustvaktException {
         ParameterChecker.checkStringValue(userId, "userId");
@@ -229,6 +248,7 @@
         return vcSet;
     }
 
+    // for admins
     public List<VirtualCorpus> retrieveVCByGroup (int groupId)
             throws KustvaktException {
         ParameterChecker.checkIntegerValue(groupId, "groupId");
@@ -238,7 +258,7 @@
                 builder.createQuery(VirtualCorpus.class);
 
         Root<VirtualCorpus> virtualCorpus = query.from(VirtualCorpus.class);
-        ListJoin<VirtualCorpus, VirtualCorpusAccess> corpusAccess =
+        Join<VirtualCorpus, VirtualCorpusAccess> corpusAccess =
                 virtualCorpus.join(VirtualCorpus_.virtualCorpusAccess);
         Join<VirtualCorpusAccess, UserGroup> accessGroup =
                 corpusAccess.join(VirtualCorpusAccess_.userGroup);
@@ -249,11 +269,4 @@
         return q.getResultList();
     }
 
-    // EM: what is needed for admin?
-    public List<VirtualCorpus> retrieveVirtualCorpusByAdmin () {
-        return null;
-
-    }
-
-
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/dto/converter/VirtualCorpusConverter.java b/full/src/main/java/de/ids_mannheim/korap/dto/converter/VirtualCorpusConverter.java
index e05f203..66a74a5 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dto/converter/VirtualCorpusConverter.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dto/converter/VirtualCorpusConverter.java
@@ -23,7 +23,7 @@
         dto.setStatus(vc.getStatus());
         dto.setDescription(vc.getDescription());
         dto.setType(vc.getType().displayName());
-        dto.setKoralQuery(vc.getCollectionQuery());
+        dto.setKoralQuery(vc.getCorpusQuery());
 
         JsonNode node = JsonUtils.readTree(statistics);
         int numberOfDoc = node.at("/documents").asInt();
diff --git a/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpus.java b/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpus.java
index 8413c24..e62af0c 100644
--- a/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpus.java
+++ b/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpus.java
@@ -46,8 +46,8 @@
     @Enumerated(EnumType.STRING)
     @Column(name = "required_access")
     private CorpusAccess requiredAccess;
-    @Column(name = "collection_query")
-    private String collectionQuery;
+    @Column(name = "corpus_query")
+    private String corpusQuery;
     private String definition;
     @Column(name = "created_by")
     private String createdBy;
@@ -59,7 +59,7 @@
     public String toString () {
         return "id=" + id + ", name= " + name + ", type= " + type + ", status= "
                 + status + ", description=" + description + ", requiredAccess="
-                + requiredAccess + ", collectionQuery= " + collectionQuery
+                + requiredAccess + ", corpusQuery= " + corpusQuery
                 + ", definition= " + definition + ", createdBy= " + createdBy;
     }
     
diff --git a/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpusAccess.java b/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpusAccess.java
index 873aac7..c3bba6e 100644
--- a/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpusAccess.java
+++ b/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpusAccess.java
@@ -43,12 +43,12 @@
     @Enumerated(EnumType.STRING)
     private VirtualCorpusAccessStatus status;
 
-    @ManyToOne(fetch=FetchType.LAZY)
+    @ManyToOne(fetch=FetchType.EAGER)
     @JoinColumn(name = "virtual_corpus_id",
             referencedColumnName = "id")
     private VirtualCorpus virtualCorpus;
 
-    @ManyToOne(fetch=FetchType.LAZY)
+    @ManyToOne(fetch=FetchType.EAGER)
     @JoinColumn(name = "user_group_id", referencedColumnName = "id")
     private UserGroup userGroup;
 
diff --git a/full/src/main/java/de/ids_mannheim/korap/service/UserGroupService.java b/full/src/main/java/de/ids_mannheim/korap/service/UserGroupService.java
index 7751988..77c6554 100644
--- a/full/src/main/java/de/ids_mannheim/korap/service/UserGroupService.java
+++ b/full/src/main/java/de/ids_mannheim/korap/service/UserGroupService.java
@@ -77,7 +77,15 @@
 
         return dtos;
     }
-
+    
+    public UserGroup retrieveUserGroupById (int groupId)
+            throws KustvaktException {
+        return userGroupDao.retrieveGroupById(groupId);
+    }
+    
+    public UserGroup retrieveAllUserGroup () {
+        return userGroupDao.retrieveAllUserGroup();
+    }
 
     /** Group owner is automatically added when creating a group. 
      *  Do not include owners in group members. 
@@ -131,7 +139,7 @@
     }
 
     public int createAutoHiddenGroup (int vcId) throws KustvaktException {
-        String groupName = "auto-group-VC" + vcId;
+        String groupName = "auto-published-group";
         int groupId = userGroupDao.createGroup(groupName, "system",
                 UserGroupStatus.HIDDEN);
 
@@ -162,4 +170,5 @@
             throws KustvaktException {
         groupMemberDao.deleteMember(username, groupId, true);
     }
+
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/service/VirtualCorpusService.java b/full/src/main/java/de/ids_mannheim/korap/service/VirtualCorpusService.java
index dee1da7..5f8bed0 100644
--- a/full/src/main/java/de/ids_mannheim/korap/service/VirtualCorpusService.java
+++ b/full/src/main/java/de/ids_mannheim/korap/service/VirtualCorpusService.java
@@ -1,6 +1,8 @@
 package de.ids_mannheim.korap.service;
 
 import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
@@ -14,12 +16,15 @@
 
 import de.ids_mannheim.korap.config.FullConfiguration;
 import de.ids_mannheim.korap.constant.PredefinedUserGroup;
+import de.ids_mannheim.korap.constant.VirtualCorpusAccessStatus;
 import de.ids_mannheim.korap.constant.VirtualCorpusType;
+import de.ids_mannheim.korap.dao.VirtualCorpusAccessDao;
 import de.ids_mannheim.korap.dao.VirtualCorpusDao;
 import de.ids_mannheim.korap.dto.VirtualCorpusDto;
 import de.ids_mannheim.korap.dto.converter.VirtualCorpusConverter;
 import de.ids_mannheim.korap.entity.UserGroup;
 import de.ids_mannheim.korap.entity.VirtualCorpus;
+import de.ids_mannheim.korap.entity.VirtualCorpusAccess;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.exceptions.StatusCodes;
 import de.ids_mannheim.korap.interfaces.AuthenticationManagerIface;
@@ -34,8 +39,8 @@
 import de.ids_mannheim.korap.web.input.VirtualCorpusJson;
 
 /** VirtualCorpusService handles the logic behind {@link VirtualCorpusController}. 
- *  It communicates with {@link VirtualCorpusDao} and returns DTO to  
- *  {@link VirtualCorpusController}.
+ *  It communicates with {@link VirtualCorpusDao} and returns 
+ *  {@link VirtualCorpusDto} to {@link VirtualCorpusController}.
  * 
  * @author margaretha
  *
@@ -47,7 +52,9 @@
             LoggerFactory.getLogger(VirtualCorpusService.class);
 
     @Autowired
-    private VirtualCorpusDao dao;
+    private VirtualCorpusDao vcDao;
+    @Autowired
+    private VirtualCorpusAccessDao accessDao;
     @Autowired
     private UserGroupService userGroupService;
     @Autowired
@@ -59,13 +66,12 @@
     @Autowired
     private VirtualCorpusConverter converter;
 
-    public void storeVC (VirtualCorpusJson vc, String username)
+    public int storeVC (VirtualCorpusJson vc, String username)
             throws KustvaktException {
 
         ParameterChecker.checkStringValue(vc.getName(), "name");
         ParameterChecker.checkObjectValue(vc.getType(), "type");
-        ParameterChecker.checkStringValue(vc.getCollectionQuery(),
-                "collectionQuery");
+        ParameterChecker.checkStringValue(vc.getCorpusQuery(), "corpusQuery");
         ParameterChecker.checkStringValue(vc.getCreatedBy(), "createdBy");
 
         User user = authManager.getUser(username);
@@ -76,31 +82,25 @@
                     "Unauthorized operation for user: " + username, username);
         }
 
-        String koralQuery = serializeCollectionQuery(vc.getCollectionQuery());
+        String koralQuery = serializeCorpusQuery(vc.getCorpusQuery());
         CorpusAccess requiredAccess = determineRequiredAccess(koralQuery);
 
-        int vcId = dao.createVirtualCorpus(vc.getName(), vc.getType(),
+        int vcId = vcDao.createVirtualCorpus(vc.getName(), vc.getType(),
                 requiredAccess, koralQuery, vc.getDefinition(),
                 vc.getDescription(), vc.getStatus(), vc.getCreatedBy());
 
-        // EM: how about VirtualCorpusType.PUBLISHED?
-        //        if (vc.getType() != null
-        //                && vc.getType().equals(VirtualCorpusType.PUBLISHED)) {
-        //            int groupId = userGroupService.createAutoHiddenGroup(vcId);
-        //            UserGroup allUserGroup = userGroupDao
-        //                    .retrieveGroupByName(PredefinedUserGroup.ALL.getValue());
-        //            int allUserGroupId = allUserGroup.getId();
-        //            // add access to VC for all and auto-group
-        //        }
-
+        if (vc.getType().equals(VirtualCorpusType.PUBLISHED)) {
+            publishVC(vcId);
+        }
         // EM: should this return anything?
+        return vcId;
     }
 
     public void editVC (VirtualCorpusJson vcJson, String username)
             throws KustvaktException {
 
         ParameterChecker.checkIntegerValue(vcJson.getId(), "id");
-        VirtualCorpus vc = dao.retrieveVCById(vcJson.getId());
+        VirtualCorpus vc = vcDao.retrieveVCById(vcJson.getId());
 
         User user = authManager.getUser(username);
 
@@ -111,31 +111,57 @@
 
         String koralQuery = null;
         CorpusAccess requiredAccess = null;
-        if (vcJson.getCollectionQuery() != null
-                && vcJson.getCollectionQuery().isEmpty()) {
-            koralQuery = serializeCollectionQuery(vcJson.getCollectionQuery());
+        if (vcJson.getCorpusQuery() != null
+                && vcJson.getCorpusQuery().isEmpty()) {
+            koralQuery = serializeCorpusQuery(vcJson.getCorpusQuery());
             requiredAccess = determineRequiredAccess(koralQuery);
         }
 
-        dao.editVirtualCorpus(vc, vcJson.getName(), vcJson.getType(), requiredAccess,
-                koralQuery, vcJson.getDefinition(), vcJson.getDescription(),
-                vcJson.getStatus());
-        
-        vc = dao.retrieveVCById(vcJson.getId());
+        vcDao.editVirtualCorpus(vc, vcJson.getName(), vcJson.getType(),
+                requiredAccess, koralQuery, vcJson.getDefinition(),
+                vcJson.getDescription(), vcJson.getStatus());
 
+        if (!vc.getType().equals(VirtualCorpusType.PUBLISHED)
+                && vcJson.getType() != null
+                && vcJson.getType().equals(VirtualCorpusType.PUBLISHED)) {
+            publishVC(vcJson.getId());
+        }
     }
 
-    private String serializeCollectionQuery (String collectionQuery)
+    private void publishVC (int vcId) throws KustvaktException {
+
+        // check if hidden access exists
+        if (!accessDao.hasHiddenAccess(vcId)) {
+            // assign hidden access for all users
+            VirtualCorpus vc = vcDao.retrieveVCById(vcId);
+            UserGroup all = userGroupService.retrieveAllUserGroup();
+            accessDao.addAccessToVC(vc, all, "system",
+                    VirtualCorpusAccessStatus.HIDDEN);
+
+            // create and assign a hidden group
+            int groupId = userGroupService.createAutoHiddenGroup(vcId);
+            UserGroup autoHidden =
+                    userGroupService.retrieveUserGroupById(groupId);
+            accessDao.addAccessToVC(vc, autoHidden, "system",
+                    VirtualCorpusAccessStatus.HIDDEN);
+        }
+        else {
+            jlog.error("Cannot publish VC with id: " + vcId
+                    + ". There have been hidden accesses for the VC already.");
+        }
+    }
+
+    private String serializeCorpusQuery (String corpusQuery)
             throws KustvaktException {
         QuerySerializer serializer = new QuerySerializer();
-        serializer.setCollection(collectionQuery);
+        serializer.setCollection(corpusQuery);
         String koralQuery;
         try {
             koralQuery = serializer.convertCollectionToJson();
         }
         catch (JsonProcessingException e) {
             throw new KustvaktException(StatusCodes.INVALID_ARGUMENT,
-                    "Invalid argument: " + collectionQuery, collectionQuery);
+                    "Invalid argument: " + corpusQuery, corpusQuery);
         }
         jlog.debug(koralQuery);
         return koralQuery;
@@ -169,14 +195,26 @@
         return (numberOfDoc > 0) ? true : false;
     }
 
-    public List<VirtualCorpusDto> retrieveUserVC (String username)
+    public List<VirtualCorpusDto> listOwnerVC (String username)
             throws KustvaktException {
+        List<VirtualCorpus> vcList = vcDao.retrieveOwnerVC(username);
+        return createVCDtos(vcList);
+    }
 
-        Set<VirtualCorpus> vcs = dao.retrieveVCByUser(username);
-        ArrayList<VirtualCorpusDto> dtos = new ArrayList<>(vcs.size());
+    public List<VirtualCorpusDto> listVCByUser (String username)
+            throws KustvaktException {
+        Set<VirtualCorpus> vcSet = vcDao.retrieveVCByUser(username);
+        return createVCDtos(vcSet);
+    }
 
-        for (VirtualCorpus vc : vcs) {
-            String json = vc.getCollectionQuery();
+    private ArrayList<VirtualCorpusDto> createVCDtos (
+            Collection<VirtualCorpus> vcList) throws KustvaktException {
+        ArrayList<VirtualCorpusDto> dtos = new ArrayList<>(vcList.size());
+        VirtualCorpus vc;
+        Iterator<VirtualCorpus> i = vcList.iterator();
+        while (i.hasNext()) {
+            vc = i.next();
+            String json = vc.getCorpusQuery();
             String statistics = krill.getStatistics(json);
             VirtualCorpusDto vcDto =
                     converter.createVirtualCorpusDto(vc, statistics);
@@ -188,8 +226,6 @@
     /** Only admin and the owner of the virtual corpus are allowed to 
      *  delete a virtual corpus.
      *  
-     *  EM: are VC-access admins also allowed to delete?
-     * 
      * @param username username
      * @param vcId virtual corpus id
      * @throws KustvaktException
@@ -197,14 +233,19 @@
     public void deleteVC (String username, int vcId) throws KustvaktException {
 
         User user = authManager.getUser(username);
-        VirtualCorpus vc = dao.retrieveVCById(vcId);
+        VirtualCorpus vc = vcDao.retrieveVCById(vcId);
 
         if (user.isAdmin() || vc.getCreatedBy().equals(username)) {
-            dao.deleteVirtualCorpus(vcId);
+            vcDao.deleteVirtualCorpus(vcId);
         }
         else {
             throw new KustvaktException(StatusCodes.AUTHORIZATION_FAILED,
                     "Unauthorized operation for user: " + username, username);
         }
     }
+
+    public List<VirtualCorpusAccess> retrieveVCAccess (int vcId)
+            throws KustvaktException {
+        return accessDao.retrieveAccessByVC(vcId);
+    }
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/VirtualCorpusController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/VirtualCorpusController.java
index ada1c8f..2e018fe 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/VirtualCorpusController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/VirtualCorpusController.java
@@ -112,13 +112,35 @@
      */
     @GET
     @Path("list")
-    public Response getUserVC (@Context SecurityContext securityContext) {
+    public Response listVCByUser (@Context SecurityContext securityContext) {
         String result;
         TokenContext context =
                 (TokenContext) securityContext.getUserPrincipal();
         try {
             List<VirtualCorpusDto> dtos =
-                    service.retrieveUserVC(context.getUsername());
+                    service.listVCByUser(context.getUsername());
+            result = JsonUtils.toJSON(dtos);
+        }
+        catch (KustvaktException e) {
+            throw responseHandler.throwit(e);
+        }
+        return Response.ok(result).build();
+    }
+    
+    /** Lists all VCs created by a user
+     * 
+     * @param securityContext
+     * @return a list of VCs created by the user in the security context.
+     */
+    @GET
+    @Path("list/user")
+    public Response listUserVC (@Context SecurityContext securityContext) {
+        String result;
+        TokenContext context =
+                (TokenContext) securityContext.getUserPrincipal();
+        try {
+            List<VirtualCorpusDto> dtos =
+                    service.listOwnerVC(context.getUsername());
             result = JsonUtils.toJSON(dtos);
         }
         catch (KustvaktException e) {
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/input/VirtualCorpusJson.java b/full/src/main/java/de/ids_mannheim/korap/web/input/VirtualCorpusJson.java
index 7038690..2c8b35a 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/input/VirtualCorpusJson.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/input/VirtualCorpusJson.java
@@ -4,7 +4,6 @@
 import de.ids_mannheim.korap.constant.VirtualCorpusType;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.service.VirtualCorpusService;
-import de.ids_mannheim.korap.utils.ParameterChecker;
 import de.ids_mannheim.korap.web.controller.VirtualCorpusController;
 import lombok.Getter;
 import lombok.Setter;
@@ -23,7 +22,7 @@
     // required in creating VCs
     private String name;
     private VirtualCorpusType type;
-    private String collectionQuery;
+    private String corpusQuery;
     private String createdBy;
     
     // required in editing VCs
@@ -35,9 +34,9 @@
     private String status;
 
 
-    public void setCollectionQuery (String collectionQuery)
+    public void setCorpusQuery (String corpusQuery)
             throws KustvaktException {
         
-        this.collectionQuery = collectionQuery;
+        this.corpusQuery = corpusQuery;
     }
 }
\ No newline at end of file
diff --git a/full/src/main/resources/db/insert/V3.1__insert_virtual_corpus.sql b/full/src/main/resources/db/insert/V3.1__insert_virtual_corpus.sql
index d613460..82ee835 100644
--- a/full/src/main/resources/db/insert/V3.1__insert_virtual_corpus.sql
+++ b/full/src/main/resources/db/insert/V3.1__insert_virtual_corpus.sql
@@ -43,19 +43,19 @@
 
 		
 -- virtual corpora
-INSERT INTO virtual_corpus(name, type, required_access, created_by, description, status, collection_query) 
+INSERT INTO virtual_corpus(name, type, required_access, created_by, description, status, corpus_query) 
 	VALUES ("dory VC", "PRIVATE", "FREE", "dory", "test vc", "experimental",
 	'{"collection": { "@type": "koral:docGroup", "operands": [ { "@type": "koral:doc", "key": "corpusSigle", "match": "match:eq", "value": "GOE" }, { "@type": "koral:doc", "key": "creationDate", "match": "match:geq", "type": "type:date", "value": "1820" } ], "operation": "operation:and" }}');
 	
-INSERT INTO virtual_corpus(name, type, required_access, created_by, description, status, collection_query) 
+INSERT INTO virtual_corpus(name, type, required_access, created_by, description, status, corpus_query) 
 	VALUES ("group VC", "PROJECT", "PUB", "dory", "test vc", "experimental",
 	'{"collection": { "@type": "koral:docGroup", "operands": [ { "@type": "koral:doc", "key": "corpusSigle", "match": "match:eq", "value": "GOE" }, { "@type": "koral:doc", "key": "creationDate", "match": "match:leq", "type": "type:date", "value": "1810" } ], "operation": "operation:and" }}');
 
-INSERT INTO virtual_corpus(name, type, required_access, created_by, description, status, collection_query) 
+INSERT INTO virtual_corpus(name, type, required_access, created_by, description, status, corpus_query) 
 	VALUES ("system VC", "PREDEFINED", "ALL", "system", "test vc", "experimental",
 	'{"collection":{"@type":"koral:doc","value":"GOE","match":"match:eq","key":"corpusSigle"}}');
 
-INSERT INTO virtual_corpus(name, type, required_access, created_by, description, status, collection_query) 
+INSERT INTO virtual_corpus(name, type, required_access, created_by, description, status, corpus_query) 
 	VALUES ("published VC", "PUBLISHED", "ALL", "marlin", "test vc", "experimental",
 	'{"collection":{"@type":"koral:doc","value":"GOE","match":"match:eq","key":"corpusSigle"}}');
 
diff --git a/full/src/main/resources/db/new-mysql/V1.1__create_virtual_corpus_tables.sql b/full/src/main/resources/db/new-mysql/V1.1__create_virtual_corpus_tables.sql
index 328e13e..a8df972 100644
--- a/full/src/main/resources/db/new-mysql/V1.1__create_virtual_corpus_tables.sql
+++ b/full/src/main/resources/db/new-mysql/V1.1__create_virtual_corpus_tables.sql
@@ -60,7 +60,7 @@
   created_by varchar(100) NOT NULL,
   description varchar(255) DEFAULT NULL,
   status varchar(100) DEFAULT NULL,
-  collection_query varchar(2000) NOT NULL,
+  corpus_query varchar(2000) NOT NULL,
   definition varchar(255) DEFAULT NULL,
   INDEX owner_index (created_by),
   INDEX type_index (type)
diff --git a/full/src/main/resources/db/new-sqlite/V1.1__create_virtual_corpus_tables.sql b/full/src/main/resources/db/new-sqlite/V1.1__create_virtual_corpus_tables.sql
index 91b01a7..8476535 100644
--- a/full/src/main/resources/db/new-sqlite/V1.1__create_virtual_corpus_tables.sql
+++ b/full/src/main/resources/db/new-sqlite/V1.1__create_virtual_corpus_tables.sql
@@ -69,7 +69,7 @@
   created_by varchar(100) NOT NULL,
   description varchar(255) DEFAULT NULL,
   status varchar(100) DEFAULT NULL,
-  collection_query varchar(2000) NOT NULL,
+  corpus_query varchar(2000) NOT NULL,
   definition varchar(255) DEFAULT NULL
 );
 
diff --git a/full/src/main/resources/db/predefined/V3.0__insert_predefined_user_groups.sql b/full/src/main/resources/db/predefined/V3.0__insert_predefined_user_groups.sql
index ba34c4e..9dc9e52 100644
--- a/full/src/main/resources/db/predefined/V3.0__insert_predefined_user_groups.sql
+++ b/full/src/main/resources/db/predefined/V3.0__insert_predefined_user_groups.sql
@@ -1,3 +1,3 @@
 
-INSERT INTO user_group(name,status,created_by) 
-	VALUES ("all users","HIDDEN","system");
\ No newline at end of file
+INSERT INTO user_group(id,name,status,created_by) 
+	VALUES (1,"all users","HIDDEN","system");
\ No newline at end of file
diff --git a/full/src/test/java/de/ids_mannheim/korap/dao/VirtualCorpusAccessDaoTest.java b/full/src/test/java/de/ids_mannheim/korap/dao/VirtualCorpusAccessDaoTest.java
new file mode 100644
index 0000000..3d538af
--- /dev/null
+++ b/full/src/test/java/de/ids_mannheim/korap/dao/VirtualCorpusAccessDaoTest.java
@@ -0,0 +1,40 @@
+package de.ids_mannheim.korap.dao;
+
+import static org.junit.Assert.*;
+
+import java.util.List;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import de.ids_mannheim.korap.constant.VirtualCorpusAccessStatus;
+import de.ids_mannheim.korap.entity.UserGroup;
+import de.ids_mannheim.korap.entity.VirtualCorpusAccess;
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration("classpath:test-config.xml")
+public class VirtualCorpusAccessDaoTest {
+
+    @Autowired
+    private VirtualCorpusAccessDao dao;
+
+    @Rule
+    public ExpectedException thrown = ExpectedException.none();
+
+    @Test
+    public void getAccessByVC () throws KustvaktException {
+        List<VirtualCorpusAccess> vcaList = dao.retrieveAccessByVC(2);
+        VirtualCorpusAccess access = vcaList.get(0);
+        assertEquals(VirtualCorpusAccessStatus.ACTIVE, access.getStatus());
+        assertEquals("dory", access.getCreatedBy());
+        
+        UserGroup group = access.getUserGroup();
+        assertEquals(2, group.getId());
+    }
+}
diff --git a/full/src/test/java/de/ids_mannheim/korap/dao/VirtualCorpusDaoTest.java b/full/src/test/java/de/ids_mannheim/korap/dao/VirtualCorpusDaoTest.java
index 4ec7314..199753a 100644
--- a/full/src/test/java/de/ids_mannheim/korap/dao/VirtualCorpusDaoTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/dao/VirtualCorpusDaoTest.java
@@ -34,7 +34,7 @@
         List<VirtualCorpus> vcList =
                 dao.retrieveVCByType(VirtualCorpusType.PUBLISHED);
         assertEquals(1, vcList.size());
-        
+
         VirtualCorpus vc = vcList.get(0);
         assertEquals(4, vc.getId());
         assertEquals("published VC", vc.getName());
diff --git a/full/src/test/java/de/ids_mannheim/korap/misc/DemoUserTest.java b/full/src/test/java/de/ids_mannheim/korap/misc/DemoUserTest.java
index 90ff26d..b3d134c 100644
--- a/full/src/test/java/de/ids_mannheim/korap/misc/DemoUserTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/misc/DemoUserTest.java
@@ -6,7 +6,7 @@
 
 import de.ids_mannheim.korap.config.BeansFactory;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.web.service.FastJerseyTest;
+import de.ids_mannheim.korap.web.FastJerseyTest;
 
 /**
  * EM: DemoUser is not saved in the new DB
diff --git a/full/src/test/java/de/ids_mannheim/korap/misc/PublicAPITest.java b/full/src/test/java/de/ids_mannheim/korap/misc/PublicAPITest.java
index 784d755..2e895aa 100644
--- a/full/src/test/java/de/ids_mannheim/korap/misc/PublicAPITest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/misc/PublicAPITest.java
@@ -1,6 +1,7 @@
 package de.ids_mannheim.korap.misc;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.web.service.FastJerseyTest;
+import de.ids_mannheim.korap.web.FastJerseyTest;
+
 import org.junit.BeforeClass;
 import org.junit.Test;
 
diff --git a/full/src/test/java/de/ids_mannheim/korap/service/VirtualCorpusServiceTest.java b/full/src/test/java/de/ids_mannheim/korap/service/VirtualCorpusServiceTest.java
new file mode 100644
index 0000000..ed585f1
--- /dev/null
+++ b/full/src/test/java/de/ids_mannheim/korap/service/VirtualCorpusServiceTest.java
@@ -0,0 +1,44 @@
+package de.ids_mannheim.korap.service;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.List;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import de.ids_mannheim.korap.constant.VirtualCorpusAccessStatus;
+import de.ids_mannheim.korap.constant.VirtualCorpusType;
+import de.ids_mannheim.korap.dto.UserGroupDto;
+import de.ids_mannheim.korap.entity.VirtualCorpusAccess;
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.web.input.VirtualCorpusJson;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration("classpath:test-config.xml")
+public class VirtualCorpusServiceTest {
+
+    @Autowired
+    private VirtualCorpusService vcService;
+
+    @Test
+    public void createPublishVC () throws KustvaktException {
+
+        VirtualCorpusJson vc = new VirtualCorpusJson();
+        vc.setCorpusQuery("corpusSigle=GOE");
+        vc.setCreatedBy("VirtualCorpusServiceTest");
+        vc.setName("new published vc");
+        vc.setType(VirtualCorpusType.PUBLISHED);
+        int vcId = vcService.storeVC(vc, "VirtualCorpusServiceTest");
+
+        List<VirtualCorpusAccess> accesses = vcService.retrieveVCAccess(vcId);
+        assertEquals(2, accesses.size());
+        for (VirtualCorpusAccess access : accesses) {
+            assertEquals(VirtualCorpusAccessStatus.HIDDEN, access.getStatus());
+        }
+    }
+
+}
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/FastJerseyTest.java b/full/src/test/java/de/ids_mannheim/korap/web/FastJerseyTest.java
similarity index 92%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/FastJerseyTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/FastJerseyTest.java
index c1a187e..aa7657a 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/FastJerseyTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/FastJerseyTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service;
+package de.ids_mannheim.korap.web;
 
 import java.util.concurrent.ThreadLocalRandom;
 
@@ -6,6 +6,7 @@
 
 import de.ids_mannheim.korap.config.ContextHolder;
 import de.ids_mannheim.korap.config.TestHelper;
+import de.ids_mannheim.korap.web.service.FastJerseyBaseTest;
 
 public abstract class FastJerseyTest extends FastJerseyBaseTest {
 
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/FilterTest.java b/full/src/test/java/de/ids_mannheim/korap/web/FilterTest.java
similarity index 95%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/full/FilterTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/FilterTest.java
index 7f3b33b..7dcfa32 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/FilterTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/FilterTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service.full;
+package de.ids_mannheim.korap.web;
 
 import static org.junit.Assert.assertEquals;
 
@@ -16,7 +16,6 @@
 import de.ids_mannheim.korap.config.TokenType;
 import de.ids_mannheim.korap.config.TestHelper;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.web.service.FastJerseyTest;
 
 /** EM: fix tests. new DB does not save users.
  * @author hanl
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/OAuth2HandlerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/OAuth2HandlerTest.java
similarity index 98%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/OAuth2HandlerTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/OAuth2HandlerTest.java
index 9d8fa86..52c266e 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/OAuth2HandlerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/OAuth2HandlerTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service;
+package de.ids_mannheim.korap.web;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/SearchKrillTest.java b/full/src/test/java/de/ids_mannheim/korap/web/SearchKrillTest.java
similarity index 98%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/SearchKrillTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/SearchKrillTest.java
index c08c247..34dd3be 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/SearchKrillTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/SearchKrillTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service;
+package de.ids_mannheim.korap.web;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/AuthServiceTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/AuthenticationControllerTest.java
similarity index 96%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/full/AuthServiceTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/controller/AuthenticationControllerTest.java
index 26bbfa5..79aa8fe 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/AuthServiceTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/AuthenticationControllerTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service.full;
+package de.ids_mannheim.korap.web.controller;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -24,7 +24,7 @@
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.JsonUtils;
 import de.ids_mannheim.korap.utils.TimeUtils;
-import de.ids_mannheim.korap.web.service.FastJerseyTest;
+import de.ids_mannheim.korap.web.FastJerseyTest;
 
 /**
  * EM: fix tests. New DB does not save users.
@@ -32,7 +32,7 @@
  * @date 24/09/2015
  */
 @Ignore
-public class AuthServiceTest extends FastJerseyTest {
+public class AuthenticationControllerTest extends FastJerseyTest {
 
     @Autowired
     HttpAuthorizationHandler handler;
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktCoreRestTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/KustvaktCoreRestTest.java
similarity index 96%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktCoreRestTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/controller/KustvaktCoreRestTest.java
index ca0adf2..324ed0e 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktCoreRestTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/KustvaktCoreRestTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service.full;
+package de.ids_mannheim.korap.web.controller;
 
 import org.junit.Ignore;
 import org.junit.Test;
@@ -7,7 +7,7 @@
 
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
-import de.ids_mannheim.korap.web.service.FastJerseyTest;
+import de.ids_mannheim.korap.web.FastJerseyTest;
 
 /**
  * @author hanl
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/MatchInfoServiceTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/MatchInfoControllerTest.java
similarity index 95%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/full/MatchInfoServiceTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/controller/MatchInfoControllerTest.java
index 6d997b7..11a3193 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/MatchInfoServiceTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/MatchInfoControllerTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service.full;
+package de.ids_mannheim.korap.web.controller;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
@@ -16,9 +16,9 @@
 import de.ids_mannheim.korap.config.TokenType;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.utils.JsonUtils;
-import de.ids_mannheim.korap.web.service.FastJerseyTest;
+import de.ids_mannheim.korap.web.FastJerseyTest;
 
-public class MatchInfoServiceTest extends FastJerseyTest {
+public class MatchInfoControllerTest extends FastJerseyTest {
 
     @Autowired
     HttpAuthorizationHandler handler;
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/OAuth2EndpointTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2EndpointTest.java
similarity index 97%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/full/OAuth2EndpointTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2EndpointTest.java
index 9d9f735..4cf05dc 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/OAuth2EndpointTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2EndpointTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service.full;
+package de.ids_mannheim.korap.web.controller;
 
 import static org.junit.Assert.assertEquals;
 
@@ -20,7 +20,7 @@
 import de.ids_mannheim.korap.config.TestHelper;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.utils.JsonUtils;
-import de.ids_mannheim.korap.web.service.FastJerseyTest;
+import de.ids_mannheim.korap.web.FastJerseyTest;
 
 /**
  * @author hanl
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/PolicyServiceTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/PolicyServiceTest.java
similarity index 98%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/full/PolicyServiceTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/controller/PolicyServiceTest.java
index 1714ae1..708259a 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/PolicyServiceTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/PolicyServiceTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service.full;
+package de.ids_mannheim.korap.web.controller;
 
 import static org.junit.Assert.assertEquals;
 
@@ -27,7 +27,7 @@
 import de.ids_mannheim.korap.security.SecurityPolicy;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.user.User.UserFactory;
-import de.ids_mannheim.korap.web.service.FastJerseyTest;
+import de.ids_mannheim.korap.web.FastJerseyTest;
 
 /** Not in the new DB
  * @author margaretha
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/QuerySerializationServiceTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/QuerySerializationControllerTest.java
similarity index 97%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/full/QuerySerializationServiceTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/controller/QuerySerializationControllerTest.java
index ea6ace6..138ca08 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/QuerySerializationServiceTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/QuerySerializationControllerTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service.full;
+package de.ids_mannheim.korap.web.controller;
 
 /**
  * @author hanl, margaretha
@@ -24,12 +24,12 @@
 import de.ids_mannheim.korap.config.TokenType;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.utils.JsonUtils;
-import de.ids_mannheim.korap.web.service.FastJerseyTest;
+import de.ids_mannheim.korap.web.FastJerseyTest;
 
 /* EM: potentially an unused service! */
 
 @Ignore
-public class QuerySerializationServiceTest extends FastJerseyTest {
+public class QuerySerializationControllerTest extends FastJerseyTest {
 
     @Autowired
     HttpAuthorizationHandler handler;
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/ResourceServiceTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/ResourceControllerTest.java
similarity index 98%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/full/ResourceServiceTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/controller/ResourceControllerTest.java
index ec5657e..ef47198 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/ResourceServiceTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/ResourceControllerTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service.full;
+package de.ids_mannheim.korap.web.controller;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
@@ -25,7 +25,7 @@
 import de.ids_mannheim.korap.resources.KustvaktResource;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.JsonUtils;
-import de.ids_mannheim.korap.web.service.FastJerseyTest;
+import de.ids_mannheim.korap.web.FastJerseyTest;
 
 /**
  * @author hanl, margaretha
@@ -34,7 +34,7 @@
  */
 @Ignore
 @Deprecated
-public class ResourceServiceTest extends FastJerseyTest {
+public class ResourceControllerTest extends FastJerseyTest {
 
     @Autowired
     HttpAuthorizationHandler handler;
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/ResourceInfoServiceTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/ResourceInfoControllerTest.java
similarity index 97%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/full/ResourceInfoServiceTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/controller/ResourceInfoControllerTest.java
index c2ac7bb..2a43ec4 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/ResourceInfoServiceTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/ResourceInfoControllerTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service.full;
+package de.ids_mannheim.korap.web.controller;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
@@ -17,14 +17,14 @@
 import de.ids_mannheim.korap.config.TokenType;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.utils.JsonUtils;
-import de.ids_mannheim.korap.web.service.FastJerseyTest;
+import de.ids_mannheim.korap.web.FastJerseyTest;
 /**
  * @author hanl, margaretha
  * @lastUpdate 19/04/2017
  * EM: FIX ME: Database restructure
  */
 @Ignore
-public class ResourceInfoServiceTest extends FastJerseyTest {
+public class ResourceInfoControllerTest extends FastJerseyTest {
 
     @Autowired
     HttpAuthorizationHandler handler;
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/ResourceRemoteApiTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/ResourceRemoteApiTest.java
similarity index 78%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/full/ResourceRemoteApiTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/controller/ResourceRemoteApiTest.java
index 95d7470..4fc436f 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/ResourceRemoteApiTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/ResourceRemoteApiTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service.full;
+package de.ids_mannheim.korap.web.controller;
 
 import org.junit.Test;
 
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/SearchServiceTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/SearchControllerTest.java
similarity index 98%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/full/SearchServiceTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/controller/SearchControllerTest.java
index 0ede615..2f2eb57 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/SearchServiceTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/SearchControllerTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service.full;
+package de.ids_mannheim.korap.web.controller;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
@@ -29,14 +29,14 @@
 import de.ids_mannheim.korap.security.ac.ResourceFinder;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.JsonUtils;
-import de.ids_mannheim.korap.web.service.FastJerseyTest;
+import de.ids_mannheim.korap.web.FastJerseyTest;
 
 /**
  * @author hanl, margaretha
  * @lastUpdate 30/05/2017
  *
  */
-public class SearchServiceTest extends FastJerseyTest {
+public class SearchControllerTest extends FastJerseyTest {
 
     @Autowired
     HttpAuthorizationHandler handler;
@@ -150,6 +150,7 @@
                 response.getStatus());
         String entity = response.getEntity(String.class);
         JsonNode node = JsonUtils.readTree(entity);
+        System.out.println(entity);
         assertNotNull(node);
         assertNotEquals(0, node.path("matches").size());
         assertEquals("koral:docGroup", node.at("/collection/@type").asText());
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/SearchWithAvailabilityTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/SearchWithAvailabilityTest.java
similarity index 99%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/full/SearchWithAvailabilityTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/controller/SearchWithAvailabilityTest.java
index dad8f99..73e6880 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/SearchWithAvailabilityTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/SearchWithAvailabilityTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service.full;
+package de.ids_mannheim.korap.web.controller;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
@@ -17,7 +17,7 @@
 import de.ids_mannheim.korap.config.TokenType;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.utils.JsonUtils;
-import de.ids_mannheim.korap.web.service.FastJerseyTest;
+import de.ids_mannheim.korap.web.FastJerseyTest;
 
 public class SearchWithAvailabilityTest extends FastJerseyTest {
     @Autowired
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/StatisticsServiceTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/StatisticsControllerTest.java
similarity index 96%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/full/StatisticsServiceTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/controller/StatisticsControllerTest.java
index 4dd4fb9..eee4016 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/StatisticsServiceTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/StatisticsControllerTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service.full;
+package de.ids_mannheim.korap.web.controller;
 
 import java.io.IOException;
 
@@ -11,14 +11,14 @@
 import com.sun.jersey.api.client.ClientResponse;
 
 import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.web.service.FastJerseyTest;
+import de.ids_mannheim.korap.web.FastJerseyTest;
 
 /** 
  * @author margaretha
  * @date 27/09/2017
  *
  */
-public class StatisticsServiceTest extends FastJerseyTest {
+public class StatisticsControllerTest extends FastJerseyTest {
 
     private ObjectMapper mapper = new ObjectMapper();
 
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/UserServiceTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/UserControllerTest.java
similarity index 98%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/full/UserServiceTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/controller/UserControllerTest.java
index 9fbf0be..3cb66f2 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/UserServiceTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/UserControllerTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service.full;
+package de.ids_mannheim.korap.web.controller;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
@@ -34,7 +34,7 @@
 import de.ids_mannheim.korap.exceptions.StatusCodes;
 import de.ids_mannheim.korap.utils.JsonUtils;
 import de.ids_mannheim.korap.utils.TimeUtils;
-import de.ids_mannheim.korap.web.service.FastJerseyTest;
+import de.ids_mannheim.korap.web.FastJerseyTest;
 
 /** EM: To do: not implemented in the new DB yet
  * @author hanl
@@ -44,7 +44,7 @@
 // todo: do benchmarks for simple request to check access_token check and user
 // retrieval!
 @Ignore
-public class UserServiceTest extends FastJerseyTest {
+public class UserControllerTest extends FastJerseyTest {
 
     @Autowired
     HttpAuthorizationHandler handler;
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/UserGroupServiceTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/UserGroupControllerTest.java
similarity index 98%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/full/UserGroupServiceTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/controller/UserGroupControllerTest.java
index 5a975a6..e59e6b5 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/UserGroupServiceTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/UserGroupControllerTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service.full;
+package de.ids_mannheim.korap.web.controller;
 
 import static org.junit.Assert.assertEquals;
 
@@ -21,7 +21,7 @@
 import de.ids_mannheim.korap.exceptions.StatusCodes;
 import de.ids_mannheim.korap.utils.JsonUtils;
 
-public class UserGroupServiceTest extends SpringJerseyTest {
+public class UserGroupControllerTest extends SpringJerseyTest {
 
     @Autowired
     private HttpAuthorizationHandler handler;
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/VirtualCorpusServiceTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/VirtualCorpusControllerTest.java
similarity index 85%
rename from full/src/test/java/de/ids_mannheim/korap/web/service/full/VirtualCorpusServiceTest.java
rename to full/src/test/java/de/ids_mannheim/korap/web/controller/VirtualCorpusControllerTest.java
index 0e02f2b..32fa94a 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/VirtualCorpusServiceTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/VirtualCorpusControllerTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.web.service.full;
+package de.ids_mannheim.korap.web.controller;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -27,13 +27,11 @@
 import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.config.AuthenticationScheme;
 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.exceptions.StatusCodes;
 import de.ids_mannheim.korap.utils.JsonUtils;
 
-public class VirtualCorpusServiceTest extends SpringJerseyTest {
+public class VirtualCorpusControllerTest extends SpringJerseyTest {
 
     @Autowired
     private HttpAuthorizationHandler handler;
@@ -94,10 +92,53 @@
     }
 
     @Test
+    public void testCreatePublishVC () throws KustvaktException {
+        String json =
+                "{\"name\": \"new published vc\",\"type\": \"PUBLISHED\",\"createdBy\": "
+                        + "\"test class\",\"corpusQuery\": \"corpusSigle=GOE\"}";
+        ClientResponse response = resource().path("vc").path("create")
+                .header(Attributes.AUTHORIZATION,
+                        handler.createBasicAuthorizationHeaderValue(
+                                "test class", "pass"))
+                .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
+                .header(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON)
+                .post(ClientResponse.class, json);
+        
+        assertEquals(Status.OK.getStatusCode(), response.getStatus());
+        
+        // test list owner vc
+        response = resource().path("vc").path("list").path("user")
+                .header(Attributes.AUTHORIZATION,
+                        handler.createBasicAuthorizationHeaderValue(
+                                "test class", "pass"))
+                .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
+
+                .get(ClientResponse.class);
+        
+        String entity = response.getEntity(String.class);
+        System.out.println(entity);
+        JsonNode node = JsonUtils.readTree(entity);
+        assertEquals(1, node.size());
+        assertEquals("new published vc", node.get(0).get("name").asText());
+        // cannot explicitly checked hidden groups here
+        
+        String vcId = node.get(0).get("id").asText();
+        
+        // delete vc
+        resource().path("vc").path("delete").queryParam("vcId", vcId)
+        .header(Attributes.AUTHORIZATION,
+                handler.createBasicAuthorizationHeaderValue(
+                        "test class", "pass"))
+        .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
+
+        .delete(ClientResponse.class);
+    }
+    
+    @Test
     public void testCreateDeleteVC () throws KustvaktException {
         String json =
                 "{\"name\": \"new vc\",\"type\": \"PRIVATE\",\"createdBy\": "
-                        + "\"test class\",\"collectionQuery\": \"corpusSigle=GOE\"}";
+                        + "\"test class\",\"corpusQuery\": \"corpusSigle=GOE\"}";
 
         ClientResponse response = resource().path("vc").path("create")
                 .header(Attributes.AUTHORIZATION,
@@ -158,7 +199,7 @@
             throws IOException, KustvaktException {
         String json =
                 "{\"name\": \"new vc\",\"type\": \"PRIVATE\",\"createdBy\": "
-                        + "\"test class\",\"collectionQuery\": \"corpusSigle=GOE\"}";
+                        + "\"test class\",\"corpusQuery\": \"corpusSigle=GOE\"}";
 
         InputStream is = getClass().getClassLoader()
                 .getResourceAsStream("test-user.token");
@@ -189,7 +230,7 @@
     public void testCreateVCUnauthorized () throws KustvaktException {
         String json =
                 "{\"name\": \"new vc\",\"type\": \"PRIVATE\",\"createdBy\": "
-                        + "\"test class\",\"collectionQuery\": \"creationDate since 1820\"}";
+                        + "\"test class\",\"corpusQuery\": \"creationDate since 1820\"}";
 
         ClientResponse response = resource().path("vc").path("create")
                 .header(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON)
@@ -208,7 +249,7 @@
     }
 
     @Test
-    public void testCreateVCWithoutCollectionQuery () throws KustvaktException {
+    public void testCreateVCWithoutcorpusQuery () throws KustvaktException {
         String json =
                 "{\"name\": \"new vc\",\"type\": \"PRIVATE\",\"createdBy\": "
                         + "\"test class\"}";
@@ -226,14 +267,14 @@
         JsonNode node = JsonUtils.readTree(entity);
         assertEquals(StatusCodes.INVALID_ARGUMENT,
                 node.at("/errors/0/0").asInt());
-        assertEquals("collectionQuery", node.at("/errors/0/1").asText());
+        assertEquals("corpusQuery", node.at("/errors/0/1").asText());
         assertEquals("null", node.at("/errors/0/2").asText());
     }
 
     @Test
     public void testCreateVCWithoutType () throws KustvaktException {
         String json = "{\"name\": \"new vc\",\"createdBy\": "
-                + "\"test class\",\"collectionQuery\": \"creationDate since 1820\"}";
+                + "\"test class\",\"corpusQuery\": \"creationDate since 1820\"}";
 
         ClientResponse response = resource().path("vc").path("create")
                 .header(Attributes.AUTHORIZATION,
@@ -256,7 +297,7 @@
     public void testCreateVCWithWrongType () throws KustvaktException {
         String json =
                 "{\"name\": \"new vc\",\"type\": \"PRIVAT\",\"createdBy\": "
-                        + "\"test class\",\"collectionQuery\": \"creationDate since 1820\"}";
+                        + "\"test class\",\"corpusQuery\": \"creationDate since 1820\"}";
 
         ClientResponse response = resource().path("vc").path("create")
                 .header(Attributes.AUTHORIZATION,
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktServerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktServerTest.java
deleted file mode 100644
index 1466056..0000000
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktServerTest.java
+++ /dev/null
@@ -1,371 +0,0 @@
-package de.ids_mannheim.korap.web.service.full;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.UUID;
-
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.ClientProtocolException;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.client.utils.URIBuilder;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.HttpClients;
-import org.junit.Assert;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.sun.jersey.api.client.ClientResponse;
-import com.sun.jersey.core.util.MultivaluedMapImpl;
-
-import de.ids_mannheim.korap.authentication.http.HttpAuthorizationHandler;
-import de.ids_mannheim.korap.config.Attributes;
-import de.ids_mannheim.korap.config.BeanConfigTest;
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.handlers.ResourceDao;
-import de.ids_mannheim.korap.resources.KustvaktResource;
-import de.ids_mannheim.korap.resources.Permissions.Permission;
-import de.ids_mannheim.korap.user.User;
-import de.ids_mannheim.korap.utils.JsonUtils;
-
-/**
- * This class tests services of a running Kustvakt server with a MySQL
- * database.
- * Please check the database configuration in
- * src/main/resources/jdbc.properties
- * and run the server before running the tests.
- * 
- * See {@link ResourceServiceTest} for tests using an in-memory
- * database.
- * 
- * @author margaretha
- *
- */
-@Ignore
-@Deprecated
-public class KustvaktServerTest extends BeanConfigTest {
-    private static ObjectMapper mapper = new ObjectMapper();
-    @Autowired
-    private HttpAuthorizationHandler handler;
-
-
-    @Test
-    public void testRegisterBadPassword ()
-            throws URISyntaxException, ClientProtocolException, IOException, KustvaktException {
-        HttpClient httpClient = HttpClients.createDefault();
-
-        MultivaluedMap<String, String> map = new MultivaluedMapImpl();
-        map.putSingle("username", "kusvakt");
-        map.putSingle("email", "kustvakt@ids-mannheim.de");
-        map.putSingle("password", "password");
-        map.putSingle("firstName", "kustvakt");
-        map.putSingle("lastName", "user");
-        map.putSingle("address", "Mannheim");
-
-        URIBuilder builder = new URIBuilder();
-        builder.setScheme("http").setHost("localhost").setPort(8089)
-                .setPath("/api/v0.1/user/register");
-        URI uri = builder.build();
-        HttpPost httppost = new HttpPost(uri);
-        StringEntity entity = new StringEntity(JsonUtils.toJSON(map));
-        httppost.setEntity(entity);
-        httppost.addHeader(HttpHeaders.CONTENT_TYPE,
-                MediaType.APPLICATION_JSON);
-        httppost.addHeader(HttpHeaders.USER_AGENT, "Apache HTTP Client");
-        httppost.addHeader(HttpHeaders.HOST, "localhost");
-
-        HttpResponse response = httpClient.execute(httppost);
-        assertEquals(ClientResponse.Status.NOT_ACCEPTABLE.getStatusCode(),
-                response.getStatusLine().getStatusCode());
-
-        HttpEntity responseEntity = response.getEntity();
-        JsonNode errorNode = mapper.readTree(responseEntity.getContent());
-        assertEquals(
-                "[The value for the parameter password is not valid or acceptable.]",
-                errorNode.get("errors").get(0).get(2).asText());
-
-    }
-
-
-    @Test
-    public void testRegisterExistingUsername ()
-            throws URISyntaxException, ClientProtocolException, IOException, KustvaktException {
-        HttpClient httpClient = HttpClients.createDefault();
-
-        MultivaluedMap<String, String> map = new MultivaluedMapImpl();
-        map.putSingle("username", "kustvakt");
-        map.putSingle("email", "kustvakt@ids-mannheim.de");
-        map.putSingle("password", "password1234");
-        map.putSingle("firstName", "kustvakt");
-        map.putSingle("lastName", "user");
-        map.putSingle("address", "Mannheim");
-
-        URIBuilder builder = new URIBuilder();
-        builder.setScheme("http").setHost("localhost").setPort(8089)
-                .setPath("/api/v0.1/user/register");
-        URI uri = builder.build();
-        HttpPost httppost = new HttpPost(uri);
-        StringEntity entity = new StringEntity(JsonUtils.toJSON(map));
-        httppost.setEntity(entity);
-        httppost.addHeader(HttpHeaders.CONTENT_TYPE,
-                MediaType.APPLICATION_JSON);
-        httppost.addHeader(HttpHeaders.USER_AGENT, "Apache HTTP Client");
-        httppost.addHeader(HttpHeaders.HOST, "localhost");
-
-        HttpResponse response = httpClient.execute(httppost);
-        assertEquals(ClientResponse.Status.BAD_REQUEST.getStatusCode(),
-                response.getStatusLine().getStatusCode());
-
-        HttpEntity responseEntity = response.getEntity();
-        JsonNode errorNode = mapper.readTree(responseEntity.getContent());
-        assertEquals(
-                "[The value for the parameter password is not valid or acceptable.]",
-                errorNode.get("errors").asText());
-    }
-
-
-    @Test
-    public void testRegisterUser ()
-            throws URISyntaxException, ClientProtocolException, IOException, KustvaktException {
-        HttpClient httpClient = HttpClients.createDefault();
-
-        MultivaluedMap<String, String> map = new MultivaluedMapImpl();
-        map.putSingle("username", "testUser");
-        map.putSingle("email", "testUser@ids-mannheim.de");
-        map.putSingle("password", "testPassword1234");
-        map.putSingle("firstName", "test");
-        map.putSingle("lastName", "user");
-        map.putSingle("address", "Mannheim");
-
-        URIBuilder builder = new URIBuilder();
-        builder.setScheme("http").setHost("localhost").setPort(8089)
-                .setPath("/api/v0.1/user/register");
-        URI uri = builder.build();
-        HttpPost httppost = new HttpPost(uri);
-        StringEntity entity = new StringEntity(JsonUtils.toJSON(map));
-        httppost.setEntity(entity);
-        httppost.addHeader(HttpHeaders.CONTENT_TYPE,
-                MediaType.APPLICATION_JSON);
-        httppost.addHeader(HttpHeaders.USER_AGENT, "Apache HTTP Client");
-        httppost.addHeader(HttpHeaders.HOST, "localhost");
-
-        HttpResponse response = httpClient.execute(httppost);
-        assertEquals(ClientResponse.Status.OK.getStatusCode(),
-                response.getStatusLine().getStatusCode());
-
-    }
-
-
-    @Test
-    public void testCreatePolicy () throws IOException, URISyntaxException, KustvaktException {
-
-        HttpClient httpClient = HttpClients.createDefault();
-
-        String id = UUID.randomUUID().toString();
-        URIBuilder builder = new URIBuilder();
-        builder.setScheme("http").setHost("localhost").setPort(8089)
-                .setPath("/api/v0.1/admin/createPolicies/" + id)
-                .setParameter("type", "virtualcollection")
-                .setParameter("name", "Goethe VC")
-                .setParameter("description", "Goethe corpus")
-                .setParameter("group", "public")
-                .setParameter("perm", Permission.READ.name())
-                .setParameter("loc", "").setParameter("expire", "");
-
-        URI uri = builder.build();
-        HttpPost httppost = new HttpPost(uri);
-
-        httppost.addHeader(Attributes.AUTHORIZATION,
-                handler.createBasicAuthorizationHeaderValue("kustvakt", "kustvakt2015"));
-        HttpResponse response = httpClient.execute(httppost);
-        assertEquals(ClientResponse.Status.OK.getStatusCode(),
-                response.getStatusLine().getStatusCode());
-
-    }
-
-
-    @Test
-    public void testCreatePolicyForFoundry ()
-            throws IOException, URISyntaxException, KustvaktException {
-
-        HttpClient httpClient = HttpClients.createDefault();
-
-        String id = UUID.randomUUID().toString();
-        URIBuilder builder = new URIBuilder();
-        builder.setScheme("http").setHost("localhost").setPort(8089)
-                .setPath("/api/v0.1/admin/createPolicies/" + id)
-                .setParameter("type", "foundry")
-                .setParameter("name", "stanford")
-                .setParameter("description", "stanford parser")
-                .setParameter("group", "public")
-                .setParameter("perm", Permission.READ.name())
-                .setParameter("loc", "255.255.255.0")
-                .setParameter("expire", "30D");
-
-        URI uri = builder.build();
-        HttpPost httppost = new HttpPost(uri);
-
-        httppost.addHeader(Attributes.AUTHORIZATION,
-                handler.createBasicAuthorizationHeaderValue("kustvakt", "kustvakt2015"));
-        HttpResponse response = httpClient.execute(httppost);
-        assertEquals(ClientResponse.Status.OK.getStatusCode(),
-                response.getStatusLine().getStatusCode());
-
-    }
-
-
-    @Test
-    public void testCreatePolicyWithMultiplePermissions ()
-            throws IOException, URISyntaxException, KustvaktException {
-
-        HttpClient httpClient = HttpClients.createDefault();
-
-        String id = UUID.randomUUID().toString();
-        URIBuilder builder = new URIBuilder();
-        builder.setScheme("http").setHost("localhost").setPort(8089)
-                .setPath("/api/v0.1/admin/createPolicies/" + id)
-                .setParameter("type", "corpus").setParameter("name", "Brown")
-                .setParameter("description", "Brown corpus")
-                .setParameter("group", "public")
-                .setParameter("perm", Permission.READ.name())
-                .setParameter("perm", Permission.WRITE.name())
-                .setParameter("perm", Permission.DELETE.name())
-                .setParameter("loc", "255.255.255.0")
-                .setParameter("expire", "30D");
-
-        URI uri = builder.build();
-        HttpPost httppost = new HttpPost(uri);
-
-        httppost.addHeader(Attributes.AUTHORIZATION,
-                handler.createBasicAuthorizationHeaderValue("kustvakt", "kustvakt2015"));
-        HttpResponse response = httpClient.execute(httppost);
-        assertEquals(ClientResponse.Status.OK.getStatusCode(),
-                response.getStatusLine().getStatusCode());
-
-    }
-
-
-    @Test
-    public void testWrongAuthorization ()
-            throws IOException, URISyntaxException, KustvaktException {
-        HttpResponse response = testResourceStore("wezrowerowj");
-        assertEquals(ClientResponse.Status.UNAUTHORIZED.getStatusCode(),
-                response.getStatusLine().getStatusCode());
-    }
-
-
-    @Test
-    public void testCorrectAuthorization ()
-            throws IOException, URISyntaxException, KustvaktException {
-
-        HttpResponse response = testResourceStore("kustvakt2015");
-        HttpEntity entity = response.getEntity();
-        String content = null;
-
-        if (entity != null) {
-            InputStream is = entity.getContent();
-            try {
-                content = IOUtils.toString(is, "UTF-8");
-            }
-            finally {
-                is.close();
-            }
-        }
-
-        assertEquals(ClientResponse.Status.OK.getStatusCode(),
-                response.getStatusLine().getStatusCode());
-
-        JsonNode node = JsonUtils.readTree(content);
-        assertNotNull(node);
-        assertTrue(node.isObject());
-        assertEquals("Goethe", node.path("name").asText());
-        assertEquals("Goethe corpus", node.path("description").asText());
-    }
-
-
-    public HttpResponse testResourceStore (String password)
-            throws IOException, URISyntaxException, KustvaktException {
-
-        HttpClient httpclient = HttpClients.createDefault();
-        URIBuilder builder = new URIBuilder();
-        builder.setScheme("http").setHost("localhost").setPort(8089)
-                .setPath("/api/v0.1/virtualcollection")
-                .setParameter("filter", "httpclient")
-                .setParameter("name", "Goethe")
-                .setParameter("description", "Goethe corpus");
-        URI uri = builder.build();
-        HttpPost httppost = new HttpPost(uri);
-        httppost.addHeader(Attributes.AUTHORIZATION,
-                handler.createBasicAuthorizationHeaderValue("kustvakt", password));
-        return httpclient.execute(httppost);
-
-    }
-    
-    @Test
-    public void testResourceUpdate ()
-            throws IOException, URISyntaxException, KustvaktException {
-
-        HttpClient httpclient = HttpClients.createDefault();
-        URIBuilder builder = new URIBuilder();
-        builder.setScheme("http").setHost("localhost").setPort(8089)
-                //.setPath("/api/v0.1/virtualcollection/00df953b-2227-4c23-84c1-5532c07bf8ce")
-                .setPath("/api/v0.1/virtualcollection/GOE-VC")
-                .setParameter("name", "Goethe collection")
-                .setParameter("description", "Goethe collection");
-        URI uri = builder.build();
-        HttpPost httppost = new HttpPost(uri);
-        httppost.addHeader(Attributes.AUTHORIZATION,
-                handler.createBasicAuthorizationHeaderValue("kustvakt", "kustvakt2015"));
-        HttpResponse response = httpclient.execute(httppost);
-        
-        assertEquals(ClientResponse.Status.OK.getStatusCode(),
-                response.getStatusLine().getStatusCode());
-        
-//        assertEquals(ClientResponse.Status.BAD_REQUEST.getStatusCode(),
-//                response.getStatusLine().getStatusCode());
-        
-//        JsonNode errorNode = mapper.readTree(response.getEntity().getContent());
-//        assertEquals(
-//                "Resource not found!",
-//                errorNode.get("errors").get(0).get(1).asText());
-        
-    }
-
-
-    private void checkResourceInDB (String id) throws KustvaktException {
-
-        ResourceDao<?> dao = new ResourceDao<>(
-                helper().getContext().getPersistenceClient());
-        assertEquals("sqlite",
-                helper().getContext().getPersistenceClient().getDatabase());
-
-        assertNotEquals(0, dao.size());
-        KustvaktResource res = dao.findbyId(id, User.UserFactory.getDemoUser());
-        assertNotNull(res);
-        Assert.assertEquals(true,
-                res.getField("testVar").toString().startsWith("testVal_"));
-    }
-
-
-    @Override
-    public void initMethod () throws KustvaktException {
-        // TODO Auto-generated method stub
-
-    }
-}
