diff --git a/src/main/resources/db/mysql/V0.1__userdatabase.sql b/src/main/resources/db/mysql/V0.1__userdatabase.sql
index 6f67575..c069b6e 100644
--- a/src/main/resources/db/mysql/V0.1__userdatabase.sql
+++ b/src/main/resources/db/mysql/V0.1__userdatabase.sql
@@ -16,7 +16,7 @@
 
 CREATE TABLE IF NOT EXISTS admin_users (
     id INTEGER PRIMARY KEY AUTO_INCREMENT,
-    user_id INTEGER NOT NULL UNIQUE,
+    user_id INTEGER NOT NULL,
     foreign key (user_id)
     references korap_users (id)
 );
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/full/ResouceServiceServerTest.java b/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktServerTest.java
similarity index 81%
rename from src/test/java/de/ids_mannheim/korap/web/service/full/ResouceServiceServerTest.java
rename to src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktServerTest.java
index 81d3e0e..aa99ac9 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/full/ResouceServiceServerTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktServerTest.java
@@ -7,10 +7,13 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URI;
 import java.net.URISyntaxException;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
 import java.security.KeyManagementException;
 import java.security.KeyStore;
 import java.security.KeyStoreException;
@@ -31,12 +34,14 @@
 import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
 import org.apache.http.conn.ssl.SSLContexts;
 import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
+import org.apache.http.impl.client.DefaultHttpClient;
 import org.apache.http.impl.client.HttpClients;
 import org.eclipse.jetty.util.ssl.SslContextFactory;
 import org.junit.Assert;
 import org.junit.Test;
 
 import com.fasterxml.jackson.databind.JsonNode;
+import com.google.common.io.Files;
 import com.sun.jersey.api.client.ClientResponse;
 
 import de.ids_mannheim.korap.config.Attributes;
@@ -59,37 +64,17 @@
  * @author margaretha
  *
  */
-public class ResouceServiceServerTest extends BeanConfigTest {
+public class KustvaktServerTest extends BeanConfigTest {
 	@Test
 	public void testCreatePolicy() throws IOException, URISyntaxException {
-		String pwd ="password";
-		InputStream stream = new FileInputStream(new File(
-                "/home/elma/korap-keystore"));
 		
-        SSLContext sslcontext = null;
-		try {
-			KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
-			ks.load(stream, pwd.toCharArray());
-			sslcontext = SSLContexts.custom()
-	                .loadTrustMaterial(ks)
-	                .loadKeyMaterial(ks, pwd.toCharArray())
-	                .build();
-		} catch (KeyStoreException | NoSuchAlgorithmException | CertificateException 
-				| KeyManagementException | UnrecoverableKeyException e) {
-			e.printStackTrace();
-		}
-		
-		SSLConnectionSocketFactory factory = new SSLConnectionSocketFactory(sslcontext,
-		         SSLConnectionSocketFactory.BROWSER_COMPATIBLE_HOSTNAME_VERIFIER);
-        HttpClient httpclient = HttpClients.custom()
-                .setSSLSocketFactory(factory)
-                .build();
+		HttpClient httpClient = HttpClients.createDefault();;
 		
         String id = UUID.randomUUID().toString();
 		URIBuilder builder = new URIBuilder();
-		builder.setScheme("https")
-			.setHost("korap.ids-mannheim.de")
-			.setPort(8443).setPath("/api/v0.1/admin/createPolicies/" + id)
+		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")
@@ -100,8 +85,9 @@
 
 		URI uri = builder.build();
 		HttpPost httppost = new HttpPost(uri);
+		
 		httppost.addHeader(Attributes.AUTHORIZATION, BasicHttpAuth.encode("kustvakt", "kustvakt2015"));
-		HttpResponse response = httpclient.execute(httppost);
+		HttpResponse response = httpClient.execute(httppost);
 		assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatusLine().getStatusCode());
 
