diff --git a/full/Changes b/full/Changes
index c4998cc..36a4c52 100644
--- a/full/Changes
+++ b/full/Changes
@@ -16,6 +16,8 @@
    - Changed the response media-type of authentication controllers (margaretha)
    - Fixed bugs: allow guest to retrieve system VC, 
      remove VC from cache when it is deleted (margaretha)
+04/07/2019
+   - Updated VC name pattern and tests (margaretha)
 
 # version 0.61.6
 04/02/2019
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 6b530bc..e18d258 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
@@ -59,7 +59,7 @@
 
     public static boolean DEBUG = false;
 
-    public static Pattern wordPattern = Pattern.compile("[-\\w. ]+");
+    public static Pattern vcNamePattern = Pattern.compile("[-\\w.]+");
 
     @Autowired
     private VirtualCorpusDao vcDao;
@@ -323,7 +323,7 @@
         ParameterChecker.checkStringValue(name, "name");
         ParameterChecker.checkObjectValue(type, "type");
 
-        if (!wordPattern.matcher(name).matches()) {
+        if (!vcNamePattern.matcher(name).matches()) {
             throw new KustvaktException(StatusCodes.INVALID_ARGUMENT,
                     "Virtual corpus name must only contains letters, numbers, "
                             + "underscores, hypens and spaces",
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 87a98c8..6c979ff 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
@@ -40,6 +40,8 @@
 /**
  * VirtualCorpusController defines web APIs related to virtual corpus
  * (VC) such as creating, deleting and listing user virtual corpora.
+ * All the APIs in this class are available to logged-in users, except
+ * retrieving info of system VC.
  * 
  * This class also includes APIs related to virtual corpus access
  * (VCA) such as sharing and publishing VC. When a VC is published,
@@ -47,7 +49,8 @@
  * VC. It is listed for a user, once when he/she have searched for the
  * VC. A VC can be published by creating or editing the VC.
  * 
- * All the APIs in this class are available to logged-in users.
+ * VC name must follow the following regex [a-zA-Z_0-9-.], other
+ * characters are not allowed.
  * 
  * @author margaretha
  *
diff --git a/full/src/main/resources/db/test/V3.1__insert_virtual_corpus.sql b/full/src/main/resources/db/test/V3.1__insert_virtual_corpus.sql
index 7d11ce6..3a0a054 100644
--- a/full/src/main/resources/db/test/V3.1__insert_virtual_corpus.sql
+++ b/full/src/main/resources/db/test/V3.1__insert_virtual_corpus.sql
@@ -62,57 +62,57 @@
 		
 -- virtual corpora
 INSERT INTO virtual_corpus(name, type, required_access, created_by, description, status, corpus_query) 
-	VALUES ("dory VC", "PRIVATE", "FREE", "dory", "test vc", "experimental",
+	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, corpus_query) 
-	VALUES ("group VC", "PROJECT", "PUB", "dory", "test vc", "experimental",
+	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, corpus_query) 
-	VALUES ("system VC", "SYSTEM", "ALL", "system", "test vc", "experimental",
+	VALUES ("system-vc", "SYSTEM", "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, corpus_query) 
-	VALUES ("published VC", "PUBLISHED", "ALL", "marlin", "test vc", "experimental",
+	VALUES ("published-vc", "PUBLISHED", "ALL", "marlin", "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, corpus_query) 
-	VALUES ("marlin VC", "PRIVATE", "FREE", "marlin", "marlin test share vc", "experimental",
+	VALUES ("marlin-vc", "PRIVATE", "FREE", "marlin", "marlin test share 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, corpus_query) 
-	VALUES ("nemo VC", "PRIVATE", "ALL", "nemo", "nemo test vc", "experimental",
+	VALUES ("nemo-vc", "PRIVATE", "ALL", "nemo", "nemo test vc", "experimental",
 	'{"collection":{"@type":"koral:doc","value":"GOE","match":"match:eq","key":"corpusSigle"}}');	
 	
 -- virtual corpus access
 INSERT INTO virtual_corpus_access(virtual_corpus_id, user_group_id, status, created_by) 
 	SELECT 
-		(SELECT id from virtual_corpus where name = "group VC"), 
+		(SELECT id from virtual_corpus where name = "group-vc"), 
 		(SELECT id from user_group where name = "dory group"), 
 		"ACTIVE", "dory";
 
 --INSERT INTO virtual_corpus_access(virtual_corpus_id, user_group_id, status, created_by) 
 --	SELECT 
---		(SELECT id from virtual_corpus where name = "system VC"), 
+--		(SELECT id from virtual_corpus where name = "system-vc"), 
 --		(SELECT id from user_group where name = "all users"),
 --		"ACTIVE", "system";
 
 INSERT INTO virtual_corpus_access(virtual_corpus_id, user_group_id, status, created_by) 
 	SELECT 
-		(SELECT id from virtual_corpus where name = "published VC"),
+		(SELECT id from virtual_corpus where name = "published-vc"),
 		(SELECT id from user_group where name = "marlin group"),
 		"ACTIVE", "marlin";
 
 INSERT INTO virtual_corpus_access(virtual_corpus_id, user_group_id, status, created_by) 
 	SELECT 
-		(SELECT id from virtual_corpus where name = "published VC"),
+		(SELECT id from virtual_corpus where name = "published-vc"),
 		(SELECT id from user_group where name = "auto group"),
 		"HIDDEN", "system";
 
 	
 -- Summary user VC Lists
--- dory: dory VC, group VC, system VC
--- nemo: group VC, system VC
--- marlin: published VC, system VC
--- pearl: system VC, published VC
+-- dory: dory-vc, group-vc, system-vc
+-- nemo: group-vc, system-vc
+-- marlin: published-vc, system-vc
+-- pearl: system-vc, published-vc
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 98bd936..525f64a 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,14 +34,14 @@
 
         VirtualCorpus vc = vcList.get(0);
         assertEquals(4, vc.getId());
-        assertEquals("published VC", vc.getName());
+        assertEquals("published-vc", vc.getName());
         assertEquals("marlin", vc.getCreatedBy());
     }
 
     @Test
     public void testSystemVC () throws KustvaktException {
         // insert vc
-        int id = dao.createVirtualCorpus("system VC", VirtualCorpusType.SYSTEM,
+        int id = dao.createVirtualCorpus("system-vc", VirtualCorpusType.SYSTEM,
                 User.CorpusAccess.FREE, "corpusSigle=GOE", "definition",
                 "description", "experimental", false, "test class");
 
@@ -64,7 +64,7 @@
         thrown.expect(PersistenceException.class);
         thrown.expectMessage("could not execute statement");
         
-        dao.createVirtualCorpus("system VC", VirtualCorpusType.SYSTEM,
+        dao.createVirtualCorpus("system-vc", VirtualCorpusType.SYSTEM,
                 User.CorpusAccess.FREE, "corpusSigle=GOE", "definition",
                 "description", "experimental", false, "system");
     }
@@ -88,10 +88,10 @@
         assertEquals(4, virtualCorpora.size());
         // ordered by id
         Iterator<VirtualCorpus> i = virtualCorpora.iterator();
-        assertEquals("dory VC", i.next().getName());
-        assertEquals("group VC", i.next().getName());
-        assertEquals("system VC", i.next().getName());
-        assertEquals("published VC", i.next().getName());
+        assertEquals("dory-vc", i.next().getName());
+        assertEquals("group-vc", i.next().getName());
+        assertEquals("system-vc", i.next().getName());
+        assertEquals("published-vc", i.next().getName());
     }
 
     /**
@@ -105,9 +105,9 @@
         List<VirtualCorpus> virtualCorpora = dao.retrieveVCByUser("nemo");
         assertEquals(3, virtualCorpora.size());
         Iterator<VirtualCorpus> i = virtualCorpora.iterator();
-        assertEquals("group VC", i.next().getName());
-        assertEquals("system VC", i.next().getName());
-        assertEquals("nemo VC", i.next().getName());
+        assertEquals("group-vc", i.next().getName());
+        assertEquals("system-vc", i.next().getName());
+        assertEquals("nemo-vc", i.next().getName());
     }
 
     /**
@@ -121,9 +121,9 @@
         List<VirtualCorpus> virtualCorpora = dao.retrieveVCByUser("marlin");
         assertEquals(3, virtualCorpora.size());
         Iterator<VirtualCorpus> i = virtualCorpora.iterator();
-        assertEquals("system VC", i.next().getName());
-        assertEquals("published VC", i.next().getName());
-        assertEquals("marlin VC", i.next().getName());
+        assertEquals("system-vc", i.next().getName());
+        assertEquals("published-vc", i.next().getName());
+        assertEquals("marlin-vc", i.next().getName());
     }
 
     /**
@@ -137,8 +137,8 @@
         List<VirtualCorpus> virtualCorpora = dao.retrieveVCByUser("pearl");
         assertEquals(2, virtualCorpora.size());
         Iterator<VirtualCorpus> i = virtualCorpora.iterator();
-        assertEquals("system VC", i.next().getName());
-        assertEquals("published VC", i.next().getName());
+        assertEquals("system-vc", i.next().getName());
+        assertEquals("published-vc", i.next().getName());
     }
 
 }
diff --git a/full/src/test/java/de/ids_mannheim/korap/rewrite/VirtualCorpusRewriteTest.java b/full/src/test/java/de/ids_mannheim/korap/rewrite/VirtualCorpusRewriteTest.java
index 6922522..b911877 100644
--- a/full/src/test/java/de/ids_mannheim/korap/rewrite/VirtualCorpusRewriteTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/rewrite/VirtualCorpusRewriteTest.java
@@ -85,7 +85,7 @@
             throws KustvaktException, Exception {
         ClientResponse response = resource().path(API_VERSION).path("search")
                 .queryParam("q", "[orth=der]").queryParam("ql", "poliqarp")
-                .queryParam("cq", "referTo \"system VC\"")
+                .queryParam("cq", "referTo \"system-vc\"")
                 .get(ClientResponse.class);
 
         String ent = response.getEntity(String.class);
@@ -110,7 +110,7 @@
     public void testRewritePubAndSystemVCRef () throws KustvaktException {
         ClientResponse response = resource().path(API_VERSION).path("search")
                 .queryParam("q", "[orth=der]").queryParam("ql", "poliqarp")
-                .queryParam("cq", "referTo \"system/system VC\"")
+                .queryParam("cq", "referTo \"system/system-vc\"")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue("user", "pass"))
                 .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
@@ -135,7 +135,7 @@
 
         ClientResponse response = resource().path(API_VERSION).path("search")
                 .queryParam("q", "Fisch").queryParam("ql", "poliqarp")
-                .queryParam("cq", "referTo \"dory/dory VC\"")
+                .queryParam("cq", "referTo \"dory/dory-vc\"")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue("dory", "pass"))
                 .get(ClientResponse.class);
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
index 89483d6..fbd95aa 100644
--- a/full/src/test/java/de/ids_mannheim/korap/service/VirtualCorpusServiceTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/service/VirtualCorpusServiceTest.java
@@ -46,12 +46,12 @@
         VirtualCorpusJson vc = new VirtualCorpusJson();
         vc.setCorpusQuery("corpusSigle=GOE");
         vc.setType(VirtualCorpusType.PRIVATE);
-        vcService.storeVC(vc, "dory VC", "dory");
+        vcService.storeVC(vc, "dory-vc", "dory");
     }
 
     @Test
     public void createDeletePublishVC () throws KustvaktException {
-        String vcName = "new published vc";
+        String vcName = "new-published-vc";
 
         VirtualCorpusJson vc = new VirtualCorpusJson();
         vc.setCorpusQuery("corpusSigle=GOE");
@@ -91,7 +91,7 @@
         String username = "dory";
         int vcId = 2;
 
-        String vcName = "group VC";
+        String vcName = "group-vc";
         VirtualCorpus existingVC =
                 vcService.searchVCByName(username, vcName, username);
         VirtualCorpusJson vcJson = new VirtualCorpusJson();
@@ -128,7 +128,7 @@
 
         // check VC
         vcDto = vcService.searchVCById("dory", vcId);
-        assertEquals("group VC", vcDto.getName());
+        assertEquals("group-vc", vcDto.getName());
         assertEquals(VirtualCorpusType.PROJECT.displayName(), vcDto.getType());
 
         // check access
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 fc58ff8..31c34b6 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
@@ -129,7 +129,7 @@
     public void testRefNotAuthorized() throws KustvaktException {
         ClientResponse response = resource().path(API_VERSION).path("search")
                 .queryParam("q", "[orth=der]").queryParam("ql", "poliqarp")
-                .queryParam("cq", "referTo \"dory/dory VC\"")
+                .queryParam("cq", "referTo \"dory/dory-vc\"")
                 .get(ClientResponse.class);
 
         String ent = response.getEntity(String.class);
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/VirtualCorpusControllerAdminTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/VirtualCorpusControllerAdminTest.java
index 90ab155..33d2c26 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/VirtualCorpusControllerAdminTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/VirtualCorpusControllerAdminTest.java
@@ -33,7 +33,7 @@
     public void testSearchPrivateVC () throws UniformInterfaceException,
             ClientHandlerException, KustvaktException {
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("dory").path("dory VC")
+                .path("dory").path("dory-vc")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue(admin, "pass"))
                 .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
@@ -45,7 +45,7 @@
         JsonNode node = JsonUtils.readTree(entity);
 
         assertEquals(1, node.at("/id").asInt());
-        assertEquals("dory VC", node.at("/name").asText());
+        assertEquals("dory-vc", node.at("/name").asText());
     }
 
     @Test
@@ -53,7 +53,7 @@
             ClientHandlerException, KustvaktException {
 
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("dory").path("group VC")
+                .path("dory").path("group-vc")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue(admin, "pass"))
                 .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
@@ -63,7 +63,7 @@
         assertEquals(Status.OK.getStatusCode(), response.getStatus());
 
         JsonNode node = JsonUtils.readTree(entity);
-        assertEquals("group VC", node.at("/name").asText());
+        assertEquals("group-vc", node.at("/name").asText());
         assertEquals(VirtualCorpusType.PROJECT.displayName(),
                 node.at("/type").asText());
     }
@@ -107,7 +107,7 @@
                 + "\"corpusQuery\": \"creationDate since 1820\"}";
 
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path(admin).path("new system vc")
+                .path(admin).path("new-system-vc")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue(admin, "pass"))
                 .header(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON)
@@ -118,7 +118,7 @@
         JsonNode node = testListSystemVC();
         assertEquals(1, node.size());
 
-        testDeleteSystemVC(admin, "new system vc");
+        testDeleteSystemVC(admin, "new-system-vc");
     }
 
     private void testDeleteSystemVC (String vcCreator, String vcName)
@@ -143,7 +143,7 @@
         String json = "{\"type\": \"PRIVATE\","
                 + "\"corpusQuery\": \"corpusSigle=GOE\"}";
 
-        String vcName = "new vc";
+        String vcName = "new-vc";
         ClientResponse response = resource().path(API_VERSION).path("vc")
                 .path(username).path(vcName)
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
@@ -231,7 +231,7 @@
 //
 //        assertEquals(admin, node.at("/createdBy").asText());
 //        assertEquals(5, node.at("/vcId").asInt());
-//        assertEquals("marlin VC", node.at("/vcName").asText());
+//        assertEquals("marlin-vc", node.at("/vcName").asText());
 //        assertEquals(1, node.at("/userGroupId").asInt());
 //        assertEquals("marlin group", node.at("/userGroupName").asText());
 //
@@ -257,7 +257,7 @@
     public void testVCSharing () throws UniformInterfaceException,
             ClientHandlerException, KustvaktException {
         String vcCreator = "marlin";
-        String vcName = "marlin VC";
+        String vcName = "marlin-vc";
         String groupName = "marlin group";
 
         testCreateVCAccess(vcCreator, vcName, groupName);
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/VirtualCorpusControllerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/VirtualCorpusControllerTest.java
index 814799a..98a1328 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/VirtualCorpusControllerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/VirtualCorpusControllerTest.java
@@ -85,7 +85,6 @@
         assertEquals(Status.OK.getStatusCode(), response.getStatus());
 
         String entity = response.getEntity(String.class);
-        // System.out.println(entity);
         return JsonUtils.readTree(entity);
     }
 
@@ -110,7 +109,6 @@
                 .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);
         return node;
     }
@@ -120,8 +118,8 @@
             ClientHandlerException, KustvaktException {
 
         JsonNode node = testSearchVC("VirtualCorpusControllerTest", "system",
-                "system VC");
-        assertEquals("system VC", node.at("/name").asText());
+                "system-vc");
+        assertEquals("system-vc", node.at("/name").asText());
         assertEquals(VirtualCorpusType.SYSTEM.displayName(),
                 node.at("/type").asText());
     }
@@ -131,9 +129,9 @@
             ClientHandlerException, KustvaktException {
 
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("system").path("system VC").get(ClientResponse.class);
+                .path("system").path("system-vc").get(ClientResponse.class);
         JsonNode node = JsonUtils.readTree(response.getEntity(String.class));
-        assertEquals("system VC", node.at("/name").asText());
+        assertEquals("system-vc", node.at("/name").asText());
         assertEquals(VirtualCorpusType.SYSTEM.displayName(),
                 node.at("/type").asText());
     }
@@ -143,8 +141,8 @@
             throws UniformInterfaceException, ClientHandlerException,
             KustvaktException {
 
-        JsonNode node = testSearchVC("dory", "dory", "dory VC");
-        assertEquals("dory VC", node.at("/name").asText());
+        JsonNode node = testSearchVC("dory", "dory", "dory-vc");
+        assertEquals("dory-vc", node.at("/name").asText());
         assertEquals(VirtualCorpusType.PRIVATE.displayName(),
                 node.at("/type").asText());
     }
@@ -154,7 +152,7 @@
             throws UniformInterfaceException, ClientHandlerException,
             KustvaktException {
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("dory").path("dory VC")
+                .path("dory").path("dory-vc")
                 .header(Attributes.AUTHORIZATION,
                         HttpAuthorizationHandler
                                 .createBasicAuthorizationHeaderValue(
@@ -177,8 +175,8 @@
     public void testRetrieveProjectVCInfo () throws UniformInterfaceException,
             ClientHandlerException, KustvaktException {
 
-        JsonNode node = testSearchVC("nemo", "dory", "group VC");
-        assertEquals("group VC", node.at("/name").asText());
+        JsonNode node = testSearchVC("nemo", "dory", "group-vc");
+        assertEquals("group-vc", node.at("/name").asText());
         assertEquals(VirtualCorpusType.PROJECT.displayName(),
                 node.at("/type").asText());
     }
@@ -189,7 +187,7 @@
             KustvaktException {
 
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("dory").path("group VC")
+                .path("dory").path("group-vc")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue("marlin", "pass"))
                 .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
@@ -209,8 +207,8 @@
     public void testRetrievePublishedVCInfo () throws UniformInterfaceException,
             ClientHandlerException, KustvaktException {
 
-        JsonNode node = testSearchVC("gill", "marlin", "published VC");
-        assertEquals("published VC", node.at("/name").asText());
+        JsonNode node = testSearchVC("gill", "marlin", "published-vc");
+        assertEquals("published-vc", node.at("/name").asText());
         assertEquals(VirtualCorpusType.PUBLISHED.displayName(),
                 node.at("/type").asText());
 
@@ -298,7 +296,7 @@
                 + "\"corpusQuery\": \"corpusSigle=GOE\"}";
 
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("VirtualCorpusControllerTest").path("new vc")
+                .path("VirtualCorpusControllerTest").path("new_vc")
                 .header(Attributes.AUTHORIZATION,
                         HttpAuthorizationHandler
                                 .createBasicAuthorizationHeaderValue(
@@ -312,10 +310,10 @@
         // list user VC
         JsonNode node = testListVC("VirtualCorpusControllerTest");
         assertEquals(2, node.size());
-        assertEquals("new vc", node.get(1).get("name").asText());
+        assertEquals("new_vc", node.get(1).get("name").asText());
 
         // delete new VC
-        testDeleteVC("new vc", "VirtualCorpusControllerTest");
+        testDeleteVC("new_vc", "VirtualCorpusControllerTest");
 
         // list VC
         node = testListVC("VirtualCorpusControllerTest");
@@ -327,7 +325,7 @@
         String json = "{\"type\": \"PUBLISHED\""
                 + ",\"corpusQuery\": \"corpusSigle=GOE\"}";
 
-        String vcName = "new published vc";
+        String vcName = "new-published-vc";
 
         ClientResponse response = resource().path(API_VERSION).path("vc")
                 .path("VirtualCorpusControllerTest").path(vcName)
@@ -352,7 +350,7 @@
         assertEquals("system", node.at("/createdBy").asText());
         assertEquals(vcName, node.at("/vcName").asText());
         assertTrue(node.at("/userGroupName").asText().startsWith("auto"));
-        assertEquals("new published vc", node.at("/vcName").asText());
+        assertEquals(vcName, node.at("/vcName").asText());
 
         String groupId = node.at("/userGroupId").asText();
 
@@ -401,7 +399,7 @@
         }
 
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("VirtualCorpusControllerTest").path("new vc")
+                .path("VirtualCorpusControllerTest").path("new_vc")
                 .header(Attributes.AUTHORIZATION,
                         AuthenticationScheme.API.displayName() + " "
                                 + authToken)
@@ -433,7 +431,7 @@
                 + "CuYAfytr_LWqY8woJs";
 
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("VirtualCorpusControllerTest").path("new vc")
+                .path("VirtualCorpusControllerTest").path("new_vc")
                 .header(Attributes.AUTHORIZATION,
                         AuthenticationScheme.API.displayName() + " "
                                 + authToken)
@@ -458,7 +456,7 @@
                 + "\"corpusQuery\": \"creationDate since 1820\"}";
 
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("VirtualCorpusControllerTest").path("new vc")
+                .path("VirtualCorpusControllerTest").path("new_vc")
                 .header(Attributes.AUTHORIZATION,
                         HttpAuthorizationHandler
                                 .createBasicAuthorizationHeaderValue(
@@ -506,7 +504,7 @@
                 + "\"corpusQuery\": \"creationDate since 1820\"}";
 
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("VirtualCorpusControllerTest").path("new vc")
+                .path("VirtualCorpusControllerTest").path("new_vc")
                 .header(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON)
                 .entity(json).put(ClientResponse.class);
 
@@ -527,7 +525,7 @@
         String json = "{\"type\": \"PRIVATE\"}";
 
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("VirtualCorpusControllerTest").path("new vc")
+                .path("VirtualCorpusControllerTest").path("new_vc")
                 .header(Attributes.AUTHORIZATION,
                         HttpAuthorizationHandler
                                 .createBasicAuthorizationHeaderValue(
@@ -548,7 +546,7 @@
     @Test
     public void testCreateVCWithoutEntity () throws KustvaktException {
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("VirtualCorpusControllerTest").path("new vc")
+                .path("VirtualCorpusControllerTest").path("new_vc")
                 .header(Attributes.AUTHORIZATION,
                         HttpAuthorizationHandler
                                 .createBasicAuthorizationHeaderValue(
@@ -570,7 +568,7 @@
         String json = "{\"corpusQuery\": " + "\"creationDate since 1820\"}";
 
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("VirtualCorpusControllerTest").path("new vc")
+                .path("VirtualCorpusControllerTest").path("new_vc")
                 .header(Attributes.AUTHORIZATION,
                         HttpAuthorizationHandler
                                 .createBasicAuthorizationHeaderValue(
@@ -594,15 +592,15 @@
                 + "\"corpusQuery\": \"creationDate since 1820\"}";
 
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("VirtualCorpusControllerTest").path("new vc")
+                .path("VirtualCorpusControllerTest").path("new_vc")
                 .header(Attributes.AUTHORIZATION,
                         HttpAuthorizationHandler
                                 .createBasicAuthorizationHeaderValue(
                                         "VirtualCorpusControllerTest", "pass"))
                 .header(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON)
                 .entity(json).put(ClientResponse.class);
+
         String entity = response.getEntity(String.class);
-        // System.out.println(entity);
         assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus());
 
         JsonNode node = JsonUtils.readTree(entity);
@@ -617,7 +615,7 @@
     @Test
     public void testDeleteVCUnauthorized () throws KustvaktException {
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("dory").path("dory VC")
+                .path("dory").path("dory-vc")
                 .header(Attributes.AUTHORIZATION,
                         HttpAuthorizationHandler
                                 .createBasicAuthorizationHeaderValue(
@@ -646,7 +644,7 @@
         String json = "{\"description\": \"edited vc\"}";
 
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("dory").path("dory VC")
+                .path("dory").path("dory-vc")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue("dory", "pass"))
                 .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
@@ -663,7 +661,7 @@
         json = "{\"description\": \"test vc\"}";
 
         response = resource().path(API_VERSION).path("vc").path("dory")
-                .path("dory VC")
+                .path("dory-vc")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue("dory", "pass"))
                 .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
@@ -683,7 +681,7 @@
         String json = "{\"corpusQuery\": \"corpusSigle=WPD17\"}";
 
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("dory").path("dory VC")
+                .path("dory").path("dory-vc")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue("dory", "pass"))
                 .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
@@ -705,7 +703,7 @@
         String json = "{\"description\": \"edited vc\"}";
 
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("dory").path("dory VC")
+                .path("dory").path("dory-vc")
                 .header(Attributes.AUTHORIZATION,
                         HttpAuthorizationHandler
                                 .createBasicAuthorizationHeaderValue(
@@ -729,7 +727,7 @@
     @Test
     public void testPublishProjectVC () throws KustvaktException {
 
-        String vcName = "group VC";
+        String vcName = "group-vc";
 
         // check the vc type
         JsonNode node = testSearchVC("dory", "dory", vcName);
@@ -765,7 +763,7 @@
         json = "{\"type\": \"PROJECT\"}";
 
         response = resource().path(API_VERSION).path("vc").path("dory")
-                .path("group VC")
+                .path("group-vc")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue("dory", "pass"))
                 .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
@@ -826,7 +824,7 @@
         JsonNode node = JsonUtils.readTree(entity);
         assertEquals(1, node.at("/0/accessId").asInt());
         assertEquals(2, node.at("/0/vcId").asInt());
-        assertEquals("group VC", node.at("/0/vcName").asText());
+        assertEquals("group-vc", node.at("/0/vcName").asText());
         assertEquals(2, node.at("/0/userGroupId").asInt());
 
         assertEquals("dory group", node.at("/0/userGroupName").asText());
@@ -836,7 +834,7 @@
     public void testCreateDeleteAccess () throws UniformInterfaceException,
             ClientHandlerException, KustvaktException {
 
-        String vcName = "marlin VC";
+        String vcName = "marlin-vc";
         String groupName = "marlin group";
 
         // check the vc type
@@ -920,7 +918,7 @@
     @Test
     public void testShareUnknownGroup () throws UniformInterfaceException,
             ClientHandlerException, KustvaktException {
-        ClientResponse response = testShareVCByCreator("marlin", "marlin VC",
+        ClientResponse response = testShareVCByCreator("marlin", "marlin-vc",
                 "non-existing-group");
         JsonNode node = JsonUtils.readTree(response.getEntity(String.class));
         assertEquals(HttpStatus.SC_NOT_FOUND, response.getStatus());
@@ -934,7 +932,7 @@
 
         // dory is VCA in marlin group
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("marlin").path("marlin VC").path("share")
+                .path("marlin").path("marlin-vc").path("share")
                 .path("marlin group")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue("dory", "pass"))
@@ -956,7 +954,7 @@
 
         // nemo is not VCA in marlin group
         ClientResponse response = resource().path(API_VERSION).path("vc")
-                .path("nemo").path("nemo VC").path("share").path("marlin group")
+                .path("nemo").path("nemo-vc").path("share").path("marlin group")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue("nemo", "pass"))
                 .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
