diff --git a/full/src/test/java/de/ids_mannheim/korap/misc/CollectionQueryBuilderTest.java b/full/src/test/java/de/ids_mannheim/korap/misc/CollectionQueryBuilderTest.java
index 0656c02..3142330 100644
--- a/full/src/test/java/de/ids_mannheim/korap/misc/CollectionQueryBuilderTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/misc/CollectionQueryBuilderTest.java
@@ -1,5 +1,7 @@
 package de.ids_mannheim.korap.misc;
 import com.fasterxml.jackson.databind.JsonNode;
+
+import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
 import de.ids_mannheim.korap.resources.KustvaktResource;
 import de.ids_mannheim.korap.resources.VirtualCollection;
@@ -19,7 +21,7 @@
 public class CollectionQueryBuilderTest {
 
     @Test
-    public void testsimpleAdd () {
+    public void testsimpleAdd () throws KustvaktException {
         KoralCollectionQueryBuilder b = new KoralCollectionQueryBuilder();
         b.with("corpusSigle=WPD");
 
@@ -32,7 +34,7 @@
 
 
     @Test
-    public void testSimpleConjunction () {
+    public void testSimpleConjunction () throws KustvaktException {
         KoralCollectionQueryBuilder b = new KoralCollectionQueryBuilder();
         b.with("corpusSigle=WPD & textClass=freizeit");
         JsonNode node = JsonUtils.readTree(b.toJSON());
@@ -49,7 +51,7 @@
 
 
     @Test
-    public void testSimpleDisjunction () {
+    public void testSimpleDisjunction () throws KustvaktException {
         KoralCollectionQueryBuilder b = new KoralCollectionQueryBuilder();
         b.with("corpusSigle=WPD | textClass=freizeit");
         JsonNode node = JsonUtils.readTree(b.toJSON());
@@ -64,7 +66,7 @@
 
 
     @Test
-    public void testComplexSubQuery () {
+    public void testComplexSubQuery () throws KustvaktException {
         KoralCollectionQueryBuilder b = new KoralCollectionQueryBuilder();
         b.with("(corpusSigle=WPD) | (textClass=freizeit & corpusSigle=BRZ13)");
         JsonNode node = JsonUtils.readTree(b.toJSON());
@@ -80,7 +82,7 @@
 
 
     @Test
-    public void testAddResourceQueryAfter () {
+    public void testAddResourceQueryAfter () throws KustvaktException {
         KoralCollectionQueryBuilder b = new KoralCollectionQueryBuilder();
         b.with("(textClass=politik & title=\"random title\") | textClass=wissenschaft");
 
@@ -109,7 +111,7 @@
 
 
     @Test
-    public void testAddComplexResourceQueryAfter () {
+    public void testAddComplexResourceQueryAfter () throws KustvaktException {
         KoralCollectionQueryBuilder b = new KoralCollectionQueryBuilder();
         b.with("(title=\"random title\") | (textClass=wissenschaft)");
 
@@ -135,7 +137,7 @@
 
 
     @Test
-    public void testBuildQuery () {
+    public void testBuildQuery () throws KustvaktException {
         String coll = "corpusSigle=WPD";
         String query = "[base=Haus]";
         QuerySerializer check = new QuerySerializer();
@@ -171,7 +173,7 @@
 
 
     @Test
-    public void testBaseQueryBuild () {
+    public void testBaseQueryBuild () throws KustvaktException {
         KoralCollectionQueryBuilder b = new KoralCollectionQueryBuilder();
         b.with("(corpusSigle=ADF) | (textClass=freizeit & corpusSigle=WPD)");
 
@@ -192,7 +194,7 @@
 
 
     @Test
-    public void testNodeMergeWithBase () {
+    public void testNodeMergeWithBase () throws KustvaktException {
         String coll = "corpusSigle=WPD";
         String query = "[base=Haus]";
         QuerySerializer check = new QuerySerializer();
@@ -214,7 +216,7 @@
 
 
     @Test
-    public void testNodeMergeWithoutBase () {
+    public void testNodeMergeWithoutBase () throws KustvaktException {
         String query = "[base=Haus]";
         QuerySerializer check = new QuerySerializer();
         check.setQuery(query, "poliqarp");
@@ -235,7 +237,7 @@
 
 
     @Test
-    public void testNodeMergeWithoutBaseWrongOperator () {
+    public void testNodeMergeWithoutBaseWrongOperator () throws KustvaktException {
         String query = "[base=Haus]";
         QuerySerializer check = new QuerySerializer();
         check.setQuery(query, "poliqarp");
@@ -263,7 +265,7 @@
 
 
     @Test
-    public void testAddOROperator () {
+    public void testAddOROperator () throws KustvaktException {
         String coll = "corpusSigle=WPD";
         String query = "[base=Haus]";
         QuerySerializer check = new QuerySerializer();
@@ -282,7 +284,7 @@
 
 
     @Test
-    public void testAddANDOperator () {
+    public void testAddANDOperator () throws KustvaktException {
         String coll = "corpusSigle=WPD";
         String query = "[base=Haus]";
         QuerySerializer check = new QuerySerializer();
@@ -301,7 +303,7 @@
 
 
     @Test
-    public void testAddDefaultOperator () {
+    public void testAddDefaultOperator () throws KustvaktException {
         String coll = "corpusSigle=WPD";
         String query = "[base=Haus]";
         QuerySerializer check = new QuerySerializer();
@@ -320,7 +322,7 @@
 
 
     @Test
-    public void testCollectionMergeWithFromResource () {
+    public void testCollectionMergeWithFromResource () throws KustvaktException {
         KoralCollectionQueryBuilder builder = new KoralCollectionQueryBuilder();
         builder.with("textClass=politik & corpusSigle=WPD");
         KustvaktResource resource = new VirtualCollection();
@@ -339,7 +341,7 @@
 
 
     @Test
-    public void testCollectionMergeWithFromResourceNoCollection () {
+    public void testCollectionMergeWithFromResourceNoCollection () throws KustvaktException {
         KoralCollectionQueryBuilder builder = new KoralCollectionQueryBuilder();
         builder.with("textClass=politik & corpusSigle=WPD");
         KustvaktResource resource = new VirtualCollection();
@@ -358,7 +360,7 @@
 
 
     @Test
-    public void testCollectionMergeFromQuerySerializer () {
+    public void testCollectionMergeFromQuerySerializer () throws KustvaktException {
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[base=Haus]", "poliqarp");
         KoralCollectionQueryBuilder total = new KoralCollectionQueryBuilder();
@@ -384,7 +386,7 @@
 
 
     @Test
-    public void testBaseCollectionNull () {
+    public void testBaseCollectionNull () throws KustvaktException {
         // base is missing collection segment
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[base=Haus]", "poliqarp");
@@ -412,7 +414,7 @@
 
 
     @Test
-    public void testMergeCollectionNull () {
+    public void testMergeCollectionNull () throws KustvaktException {
         // merge json is missing collection segment
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[base=Haus]", "poliqarp");
diff --git a/full/src/test/java/de/ids_mannheim/korap/misc/LocalQueryTest.java b/full/src/test/java/de/ids_mannheim/korap/misc/LocalQueryTest.java
index e5020f9..ff8df15 100644
--- a/full/src/test/java/de/ids_mannheim/korap/misc/LocalQueryTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/misc/LocalQueryTest.java
@@ -37,7 +37,7 @@
 
 
     @Test
-    public void testQuery () {
+    public void testQuery () throws KustvaktException {
         SearchKrill krill = new SearchKrill(index);
         KoralCollectionQueryBuilder coll = new KoralCollectionQueryBuilder();
         coll.with(qstring);
diff --git a/full/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java b/full/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java
index 43ff936..439462a 100644
--- a/full/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java
@@ -131,7 +131,7 @@
 
 
     @Test
-    public void testDataFactoryAdd () {
+    public void testDataFactoryAdd () throws KustvaktException {
         String data = "{}";
         Object node = JsonUtils.readTree(data);
 
@@ -153,7 +153,7 @@
 
 
     @Test
-    public void testDataFactoryGet () {
+    public void testDataFactoryGet () throws KustvaktException {
         String data = "{}";
         Object node = JsonUtils.readTree(data);
 
@@ -203,7 +203,7 @@
 
 
     @Test
-    public void testDataFactoryEmbeddedProperty () {
+    public void testDataFactoryEmbeddedProperty () throws KustvaktException {
         String data = "{}";
         JsonNode node = JsonUtils.readTree(data);
 
@@ -247,7 +247,7 @@
 
 
     @Test
-    public void testDataFactoryMerge () {
+    public void testDataFactoryMerge () throws KustvaktException {
         String data = "{}";
         Object node = JsonUtils.readTree(data);
 
@@ -277,7 +277,7 @@
 
     @Test
     @Ignore
-    public void testDataFactoryRemove () {
+    public void testDataFactoryRemove () throws KustvaktException {
         String data = "{}";
         Object node = JsonUtils.readTree(data);
 
@@ -382,7 +382,7 @@
 
 
     @Test
-    public void testDataFactoryKeys () {
+    public void testDataFactoryKeys () throws KustvaktException {
         String data = "{}";
         Object node = JsonUtils.readTree(data);
 
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/service/SearchKrillTest.java
index 4e06330..f8e664a 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/service/SearchKrillTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/service/SearchKrillTest.java
@@ -65,7 +65,7 @@
 	}
 
     @Test
-    public void testSearch () {
+    public void testSearch () throws KustvaktException {
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[orth=der]", "poliqarp");
 
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/service/full/AuthServiceTest.java
index 77eeb10..58d3ad6 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/service/full/AuthServiceTest.java
@@ -53,7 +53,7 @@
     }
 
     @Test
-    public void testSessionToken() {
+    public void testSessionToken() throws KustvaktException {
         String auth = BasicHttpAuth.encode(credentials[0], credentials[1]);
         ClientResponse response = resource().path("auth")
                 .path("sessionToken").header(Attributes.AUTHORIZATION, auth)
@@ -89,7 +89,7 @@
     }
 
     @Test
-    public void testSessionTokenExpire() {
+    public void testSessionTokenExpire() throws KustvaktException {
         String auth = BasicHttpAuth.encode(credentials[0], credentials[1]);
         ClientResponse response = resource().path("auth")
                 .path("sessionToken").header(Attributes.AUTHORIZATION, auth)
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/service/full/MatchInfoServiceTest.java
index 374f9fc..3b575d4 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/service/full/MatchInfoServiceTest.java
@@ -20,7 +20,7 @@
 public class MatchInfoServiceTest extends FastJerseyTest {
 
     @Test
-    public void testGetMatchInfoPublicCorpus () {
+    public void testGetMatchInfoPublicCorpus () throws KustvaktException {
 
         ClientResponse response = resource()
                 .path("corpus").path("GOE").path("AGA").path("01784")
@@ -46,7 +46,7 @@
     }
     
     @Test
-    public void testGetMatchInfoNotAllowed () {
+    public void testGetMatchInfoNotAllowed () throws KustvaktException {
 
         ClientResponse response = resource()
                 .path("corpus").path("GOE").path("AGI").path("04846")
@@ -67,7 +67,7 @@
     }
 
     @Test
-    public void testGetMatchInfoWithAuthentication () {
+    public void testGetMatchInfoWithAuthentication () throws KustvaktException {
         ClientResponse response = resource()
                 .path("corpus").path("GOE").path("AGI").path("04846")
                 .path("p36875-36876").path("matchInfo")
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/service/full/OAuth2EndpointTest.java
index f4d0144..807ee1f 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/service/full/OAuth2EndpointTest.java
@@ -8,7 +8,9 @@
 import org.junit.Test;
 
 import com.fasterxml.jackson.databind.JsonNode;
+import com.sun.jersey.api.client.ClientHandlerException;
 import com.sun.jersey.api.client.ClientResponse;
+import com.sun.jersey.api.client.UniformInterfaceException;
 
 import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.config.TestHelper;
@@ -32,7 +34,7 @@
 
 
     @Test
-    public void testAuthorizeClient () {
+    public void testAuthorizeClient () throws ClientHandlerException, UniformInterfaceException, KustvaktException {
         String auth = BasicHttpAuth.encode(helper().getUser().getUsername(),
                 (String) TestHelper.getUserCredentials().get(Attributes.PASSWORD));
         ClientResponse response = resource().path(getAPIVersion()).path("oauth2")
@@ -53,7 +55,7 @@
 
     @Test
     @Ignore
-    public void testRevokeClient () {
+    public void testRevokeClient () throws ClientHandlerException, UniformInterfaceException, KustvaktException {
         ClientResponse response = resource().path(getAPIVersion()).path("oauth2")
                 .path("register")
                 .queryParam("redirect_url", "korap.ids-mannheim.de/redirect")
@@ -68,7 +70,7 @@
 
     @Test
     @Ignore
-    public void authenticate () {
+    public void authenticate () throws KustvaktException {
         Map<String, Object> cred = TestHelper.getUserCredentials();
         String enc = BasicHttpAuth.encode((String) cred.get(Attributes.USERNAME), (String) cred.get(Attributes.PASSWORD));
         ClientResponse response = resource().path(getAPIVersion()).path("oauth2")
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/service/full/QuerySerializationServiceTest.java
index eed1024..88fd598 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/service/full/QuerySerializationServiceTest.java
@@ -37,7 +37,7 @@
 
 
     @Test
-    public void testQuerySerializationFilteredPublic () {
+    public void testQuerySerializationFilteredPublic () throws KustvaktException {
         ClientResponse response = resource()
 
                 .path("corpus/WPD13/query").queryParam("q", "[orth=der]")
@@ -55,7 +55,7 @@
 
 
     @Test
-    public void testQuerySerializationUnexistingResource () {
+    public void testQuerySerializationUnexistingResource () throws KustvaktException {
         ClientResponse response = resource()
 
                 .path("corpus/ZUW19/query").queryParam("q", "[orth=der]")
@@ -72,7 +72,7 @@
 
 
     @Test
-    public void testQuerySerializationWithNonPublicCorpus () {
+    public void testQuerySerializationWithNonPublicCorpus () throws KustvaktException {
         ClientResponse response = resource()
 
                 .path("corpus/BRZ10/query").queryParam("q", "[orth=der]")
@@ -89,7 +89,7 @@
 
 
     @Test
-    public void testQuerySerializationWithAuthentication () {
+    public void testQuerySerializationWithAuthentication () throws KustvaktException {
         ClientResponse response = resource()
 
                 .path("corpus/BRZ10/query").queryParam("q", "[orth=der]")
@@ -109,7 +109,7 @@
 
 
     @Test
-    public void testQuerySerializationWithNewCollection () {
+    public void testQuerySerializationWithNewCollection () throws KustvaktException {
         // Add Virtual Collection
         ClientResponse response = resource()
 
@@ -191,7 +191,7 @@
 
 
     @Test
-    public void testQuerySerializationOfVirtualCollection () {
+    public void testQuerySerializationOfVirtualCollection () throws KustvaktException {
         ClientResponse response = resource()
 
                 .path("collection/GOE-VC/query").queryParam("q", "[orth=der]")
@@ -218,7 +218,7 @@
 
 
     @Test
-    public void testMetaQuerySerialization () {
+    public void testMetaQuerySerialization () throws KustvaktException {
         ClientResponse response = resource()
 
                 .path("query").queryParam("context", "sentence")
@@ -245,7 +245,7 @@
 
 
     @Test
-    public void testMetaQuerySerializationWithOffset () {
+    public void testMetaQuerySerializationWithOffset () throws KustvaktException{
         ClientResponse response = resource()
 
                 .path("query").queryParam("context", "sentence")
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/service/full/ResourceInfoServiceTest.java
index 2ef3fd1..06741be 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/service/full/ResourceInfoServiceTest.java
@@ -31,7 +31,7 @@
     }
 
     @Test
-    public void testGetPublicVirtualCollectionInfo () {
+    public void testGetPublicVirtualCollectionInfo () throws KustvaktException{
         ClientResponse response = resource().path(getAPIVersion())
                 .path("collection").get(ClientResponse.class);
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -44,7 +44,7 @@
 
 
     @Test
-    public void testGetVirtualCollectionInfoWithAuthentication () {
+    public void testGetVirtualCollectionInfoWithAuthentication () throws KustvaktException{
         ClientResponse response = resource().path(getAPIVersion())
                 .path("collection")
                 .header(Attributes.AUTHORIZATION,
@@ -61,7 +61,7 @@
 
 
     @Test
-    public void testGetVirtualCollectionInfoById () {
+    public void testGetVirtualCollectionInfoById () throws KustvaktException{
         ClientResponse response = resource().path(getAPIVersion())
                 .path("collection").path("GOE-VC").get(ClientResponse.class);
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -77,7 +77,7 @@
     }
     
     @Test
-    public void testGetVirtualCollectionInfoByIdUnauthorized () {
+    public void testGetVirtualCollectionInfoByIdUnauthorized () throws KustvaktException{
         ClientResponse response = resource().path(getAPIVersion())
                 .path("collection").path("WPD15-VC").get(ClientResponse.class);
         assertEquals(ClientResponse.Status.BAD_REQUEST.getStatusCode(),
@@ -92,7 +92,7 @@
     }
     
     @Test
-    public void testGetPublicCorporaInfo () {
+    public void testGetPublicCorporaInfo () throws KustvaktException{
         ClientResponse response = resource().path(getAPIVersion())
                 .path("corpus").get(ClientResponse.class);
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -106,7 +106,7 @@
 
 
     @Test
-    public void testGetCorpusInfoById () {
+    public void testGetCorpusInfoById () throws KustvaktException{
         ClientResponse response = resource().path(getAPIVersion())
                 .path("corpus").path("WPD13").get(ClientResponse.class);
         
@@ -122,7 +122,7 @@
 
 
     @Test
-    public void testGetCorpusInfoById2 () {
+    public void testGetCorpusInfoById2 () throws KustvaktException{
         ClientResponse response = resource().path(getAPIVersion())
                 .path("corpus").path("GOE").get(ClientResponse.class);
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -136,7 +136,7 @@
 
 
     @Test
-    public void testGetPublicFoundriesInfo () {
+    public void testGetPublicFoundriesInfo () throws KustvaktException{
         ClientResponse response = resource().path(getAPIVersion())
                 .path("foundry").get(ClientResponse.class);
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -150,7 +150,7 @@
 
 
     @Test
-    public void testGetFoundryInfoById () {
+    public void testGetFoundryInfoById () throws KustvaktException{
         ClientResponse response = resource().path(getAPIVersion())
                 .path("foundry").path("tt").get(ClientResponse.class);
         String ent = response.getEntity(String.class);
@@ -164,7 +164,7 @@
 
 
     @Test
-    public void testGetUnexistingCorpusInfo () {
+    public void testGetUnexistingCorpusInfo () throws KustvaktException{
         ClientResponse response = resource().path(getAPIVersion())
                 .path("corpus").path("ZUW19").get(ClientResponse.class);
         assertEquals(ClientResponse.Status.BAD_REQUEST.getStatusCode(),
@@ -182,7 +182,7 @@
     // EM: queries for an unauthorized corpus get the same responses / treatment as 
     // asking for an unexisting corpus info. Does it need a specific exception instead?
     @Test
-    public void testGetUnauthorizedCorpusInfo () {
+    public void testGetUnauthorizedCorpusInfo () throws KustvaktException{
         ClientResponse response = resource().path(getAPIVersion())
                 .path("corpus").path("BRZ10").get(ClientResponse.class);
         assertEquals(ClientResponse.Status.BAD_REQUEST.getStatusCode(),
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/service/full/ResourceServiceTest.java
index 0ccc272..3b6850b 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/service/full/ResourceServiceTest.java
@@ -39,7 +39,7 @@
     // create a simple test collection for user kustvakt, otherwise test fails
     @Test
     @Ignore
-    public void testStats () {
+    public void testStats () throws KustvaktException{
         ClientResponse response = resource().path(getAPIVersion())
                 .path("collection")
                 .header(Attributes.AUTHORIZATION,
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/service/full/SearchServiceTest.java
index 1362f33..f40ba1b 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/service/full/SearchServiceTest.java
@@ -46,7 +46,7 @@
 
 
     @Test
-    public void testSearchQueryPublicCorpora () {
+    public void testSearchQueryPublicCorpora () throws KustvaktException{
         ClientResponse response = resource()
                 .path("search").queryParam("q", "[orth=der]")
                 .queryParam("ql", "poliqarp")
@@ -68,7 +68,7 @@
 
 
     @Test
-    public void testSearchQueryWithMeta () {
+    public void testSearchQueryWithMeta () throws KustvaktException{
         ClientResponse response = resource()
                 .path("search").queryParam("q", "[orth=der]")
                 .queryParam("ql", "poliqarp").queryParam("cutoff", "true")
@@ -89,7 +89,7 @@
     }
 
     @Test
-    public void testSearchQueryFreeExtern () {
+    public void testSearchQueryFreeExtern () throws KustvaktException{
         ClientResponse response = resource()
                 .path("search").queryParam("q", "[orth=die]")
                 .queryParam("ql", "poliqarp")
@@ -111,7 +111,7 @@
     }
     
     @Test
-    public void testSearchQueryFreeIntern () {
+    public void testSearchQueryFreeIntern () throws KustvaktException{
         ClientResponse response = resource()
                 .path("search").queryParam("q", "[orth=die]")
                 .queryParam("ql", "poliqarp")
@@ -134,7 +134,7 @@
     
     
     @Test
-    public void testSearchQueryExternAuthorized () {
+    public void testSearchQueryExternAuthorized () throws KustvaktException{
         ClientResponse response = resource()
                 .path("search").queryParam("q", "[orth=die]")
                 .queryParam("ql", "poliqarp")
@@ -160,7 +160,7 @@
     }
 
     @Test
-    public void testSearchQueryInternAuthorized () {
+    public void testSearchQueryInternAuthorized () throws KustvaktException{
         ClientResponse response = resource()
                 .path("search").queryParam("q", "[orth=die]")
                 .queryParam("ql", "poliqarp")
@@ -191,7 +191,7 @@
  // EM: shouldn't this case gets CorpusAccess.PUB ? 
     @Test
     @Ignore
-    public void testSearchQueryWithCollectionQueryAuthorizedWithoutIP () {
+    public void testSearchQueryWithCollectionQueryAuthorizedWithoutIP () throws KustvaktException{
         ClientResponse response = resource()
                 .path("search").queryParam("q", "[orth=das]")
                 .queryParam("ql", "poliqarp")
@@ -221,7 +221,7 @@
     
     @Test
     @Ignore
-    public void testSearchQueryAuthorizedWithoutIP () {
+    public void testSearchQueryAuthorizedWithoutIP () throws KustvaktException{
         ClientResponse response = resource()
                 .path("search").queryParam("q", "[orth=die]")
                 .queryParam("ql", "poliqarp")
@@ -247,7 +247,7 @@
 
     @Test
     @Ignore
-    public void testSearchForPublicCorpusWithStringId () {
+    public void testSearchForPublicCorpusWithStringId () throws KustvaktException {
         ClientResponse response = resource()
                 .path("corpus").path("GOE").path("search")
                 .queryParam("q", "blau").queryParam("ql", "poliqarp")
@@ -273,7 +273,7 @@
 
     @Test
     @Ignore
-    public void testSearchForVirtualCollectionWithStringId () {
+    public void testSearchForVirtualCollectionWithStringId () throws KustvaktException{
         ClientResponse response = resource()
                 .path("collection").path("GOE-VC").path("search")
                 .queryParam("q", "blau").queryParam("ql", "poliqarp")
@@ -338,7 +338,7 @@
 
     @Test
     @Ignore
-    public void testSearchForCorpusWithStringIdUnauthorized () {
+    public void testSearchForCorpusWithStringIdUnauthorized () throws KustvaktException {
         ClientResponse response = resource()
                 .path("corpus").path("WPD15").path("search")
                 .queryParam("q", "blau").queryParam("ql", "poliqarp")
@@ -355,7 +355,7 @@
 
     @Test
     @Ignore
-    public void testSearchForSpecificCorpus () {
+    public void testSearchForSpecificCorpus () throws KustvaktException{
         ClientResponse response = resource()
                 .path("corpus").path("GOE").path("search")
                 .queryParam("q", "[orth=das]").queryParam("ql", "poliqarp")
@@ -423,7 +423,7 @@
 
 
     @Test
-    public void testSearchSentenceMeta () {
+    public void testSearchSentenceMeta () throws KustvaktException{
         ClientResponse response = resource()
                 .path("search").queryParam("q", "[orth=der]")
                 .queryParam("ql", "poliqarp").queryParam("context", "sentence")
@@ -439,7 +439,7 @@
 
 
     @Test
-    public void testSearchSimpleCQL () {
+    public void testSearchSimpleCQL () throws KustvaktException{
         QuerySerializer s = new QuerySerializer();
         s.setQuery("(der) or (das)", "CQL");
 
@@ -457,7 +457,7 @@
 
 
     @Test
-    public void testSearchRawQuery () {
+    public void testSearchRawQuery () throws KustvaktException{
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[orth=der]", "poliqarp");
         s.setCollection("corpusSigle=GOE");
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/service/full/SearchWithAvailabilityTest.java
index 5427fd0..cbf1b3e 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/service/full/SearchWithAvailabilityTest.java
@@ -22,7 +22,7 @@
 //        helper().runBootInterfaces();
     }
 
-    private void checkAndFree (String json) {
+    private void checkAndFree (String json) throws KustvaktException{
         JsonNode node = JsonUtils.readTree(json);
         assertEquals("availability",
                 node.at("/collection/operands/0/key").asText());
@@ -35,7 +35,7 @@
     }
 
 
-    private void checkAndPublic (String json) {
+    private void checkAndPublic (String json) throws KustvaktException{
         JsonNode node = JsonUtils.readTree(json);
         assertNotNull(node);
         assertEquals("operation:and",
@@ -58,7 +58,7 @@
                 node.at("/collection/rewrites/0/scope").asText());
     }
     
-    private void checkAndPublicWithoutACA (String json) {
+    private void checkAndPublicWithoutACA (String json) throws KustvaktException{
         JsonNode node = JsonUtils.readTree(json);
         assertNotNull(node);
         assertEquals("operation:and",
@@ -87,7 +87,7 @@
                 node.at("/collection/rewrites/0/scope").asText());
     }
     
-    private void checkAndAll (String json) {
+    private void checkAndAll (String json) throws KustvaktException{
         JsonNode node = JsonUtils.readTree(json);
         assertNotNull(node);
         assertEquals("availability(ALL)",
@@ -127,7 +127,7 @@
         
     }
 
-    private void checkAndAllWithoutACA (String json) {
+    private void checkAndAllWithoutACA (String json) throws KustvaktException{
         JsonNode node = JsonUtils.readTree(json);
         assertNotNull(node);
         assertEquals("operation:and",
@@ -172,7 +172,7 @@
 
 
     @Test
-    public void testAvailabilityFreeAuthorized () {
+    public void testAvailabilityFreeAuthorized () throws KustvaktException{
         ClientResponse response = builtSimpleClientResponse(
                 "availability = CC-BY-SA");
 
@@ -184,7 +184,7 @@
 
 
     @Test
-    public void testAvailabilityRegexFreeAuthorized () {
+    public void testAvailabilityRegexFreeAuthorized () throws KustvaktException{
         ClientResponse response = builtSimpleClientResponse(
                 "availability = /.*BY.*/");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -195,7 +195,7 @@
 
 
     @Test
-    public void testAvailabilityFreeUnauthorized () {
+    public void testAvailabilityFreeUnauthorized () throws KustvaktException{
         ClientResponse response = builtSimpleClientResponse(
                 "availability = ACA-NC");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -206,7 +206,7 @@
 
 
     @Test
-    public void testAvailabilityRegexFreeUnauthorized () {
+    public void testAvailabilityRegexFreeUnauthorized () throws KustvaktException{
         ClientResponse response = builtSimpleClientResponse(
                 "availability = /ACA.*/");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -216,7 +216,7 @@
     }
 
     @Test
-    public void testAvailabilityRegexNoRewrite () {
+    public void testAvailabilityRegexNoRewrite () throws KustvaktException{
         ClientResponse response = builtSimpleClientResponse(
                 "availability = /CC-BY.*/ & availability = /ACA.*/");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -242,7 +242,7 @@
 
 
     @Test
-    public void testAvailabilityRegexFreeUnauthorized3 () {
+    public void testAvailabilityRegexFreeUnauthorized3 () throws KustvaktException{
         ClientResponse response = builtSimpleClientResponse(
                 "availability = /.*NC.*/");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -254,7 +254,7 @@
 
 
     @Test
-    public void testNegationAvailabilityFreeUnauthorized () {
+    public void testNegationAvailabilityFreeUnauthorized () throws KustvaktException{
         ClientResponse response = builtSimpleClientResponse(
                 "availability != /CC-BY.*/");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -265,7 +265,7 @@
 
 
     @Test
-    public void testNegationAvailabilityFreeUnauthorized2 () {
+    public void testNegationAvailabilityFreeUnauthorized2 () throws KustvaktException{
         ClientResponse response = builtSimpleClientResponse(
                 "availability != /.*BY.*/");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -276,7 +276,7 @@
 
 
     @Test
-    public void testComplexNegationAvailabilityFreeUnauthorized () {
+    public void testComplexNegationAvailabilityFreeUnauthorized () throws KustvaktException{
         ClientResponse response = builtSimpleClientResponse(
                 "textClass=politik & availability != /CC-BY.*/");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -287,7 +287,7 @@
 
 
     @Test
-    public void testComplexAvailabilityFreeUnauthorized () {
+    public void testComplexAvailabilityFreeUnauthorized () throws KustvaktException{
         ClientResponse response = builtSimpleClientResponse(
                 "textClass=politik & availability=ACA-NC");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -298,7 +298,7 @@
 
 
     @Test
-    public void testComplexAvailabilityFreeUnauthorized3 () {
+    public void testComplexAvailabilityFreeUnauthorized3 () throws KustvaktException{
         ClientResponse response = builtSimpleClientResponse(
                 "textClass=politik & availability=/.*NC.*/");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -309,7 +309,7 @@
 
 
     @Test
-    public void testAvailabilityPublicAuthorized () {
+    public void testAvailabilityPublicAuthorized () throws KustvaktException{
         ClientResponse response = builtClientResponseWithIP(
                 "availability=ACA-NC", "149.27.0.32");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -320,7 +320,7 @@
 
 
     @Test
-    public void testAvailabilityPublicUnauthorized () {
+    public void testAvailabilityPublicUnauthorized () throws KustvaktException{
         ClientResponse response = builtClientResponseWithIP(
                 "availability=QAO-NC-LOC:ids", "149.27.0.32");
 
@@ -332,7 +332,7 @@
 
 
     @Test
-    public void testAvailabilityRegexPublicAuthorized () {
+    public void testAvailabilityRegexPublicAuthorized () throws KustvaktException{
         ClientResponse response = builtClientResponseWithIP(
                 "availability= /ACA.*/", "149.27.0.32");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -343,7 +343,7 @@
 
 
     @Test
-    public void testNegationAvailabilityPublicUnauthorized () {
+    public void testNegationAvailabilityPublicUnauthorized () throws KustvaktException{
         ClientResponse response = builtClientResponseWithIP(
                 "availability != ACA-NC", "149.27.0.32");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -354,7 +354,7 @@
 
 
     @Test
-    public void testNegationAvailabilityRegexPublicUnauthorized () {
+    public void testNegationAvailabilityRegexPublicUnauthorized () throws KustvaktException{
         ClientResponse response = builtClientResponseWithIP(
                 "availability != /ACA.*/", "149.27.0.32");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -365,7 +365,7 @@
 
 
     @Test
-    public void testComplexAvailabilityPublicUnauthorized () {
+    public void testComplexAvailabilityPublicUnauthorized () throws KustvaktException{
         ClientResponse response = builtClientResponseWithIP(
                 "textClass=politik & availability=QAO-NC-LOC:ids",
                 "149.27.0.32");
@@ -378,7 +378,7 @@
 
 
     @Test
-    public void testNegationComplexAvailabilityPublicUnauthorized () {
+    public void testNegationComplexAvailabilityPublicUnauthorized () throws KustvaktException{
         ClientResponse response = builtClientResponseWithIP(
                 "textClass=politik & availability!=QAO-NC-LOC:ids",
                 "149.27.0.32");
@@ -390,7 +390,7 @@
     }
 
     @Test
-    public void testAvailabilityRegexAllAuthorized () {
+    public void testAvailabilityRegexAllAuthorized () throws KustvaktException{
         ClientResponse response = builtClientResponseWithIP(
                 "availability= /ACA.*/", "10.27.0.32");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
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/service/full/UserServiceTest.java
index 4c84a67..b754d26 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/service/full/UserServiceTest.java
@@ -60,7 +60,7 @@
 	}
 
 	@Test
-	public void testRegisterMissingFields() {
+	public void testRegisterMissingFields() throws KustvaktException{
 
 		MultivaluedMap map = new MultivaluedMapImpl();
 		map.putSingle("username", "testuser"); // bodmer funktioniert noch nicht
@@ -114,7 +114,7 @@
 
 	// should be run over https, since password is transmitted in plain text
 	@Test
-	public void testRegisterAndConfirm() {
+	public void testRegisterAndConfirm() throws KustvaktException{
 		MultivaluedMap map = new MultivaluedMapImpl();
 		map.putSingle("username", "testuser");
 		map.putSingle("email", "hanl@ids-mannheim.de");
@@ -154,7 +154,7 @@
 	// EM: This test require VPN / IDS Intranet
 	@Test
 	@Ignore
-	public void loginJWT() {
+	public void loginJWT() throws KustvaktException{
 		String en = BasicHttpAuth.encode(credentials[0], credentials[1]);
 		/* lauffähige Version von Hanl: */
 		ClientResponse response = resource().path("auth").path("apiToken")
@@ -238,7 +238,7 @@
 	}
 
 	@Test
-	public void testUpdateUserDetailsMerge() {
+	public void testUpdateUserDetailsMerge() throws KustvaktException{
 		String enc = BasicHttpAuth.encode(credentials[0], credentials[1]);
 		Map m = new LinkedMap();
 		m.put("test", "test value 1");
@@ -294,7 +294,7 @@
 	}
 
 	@Test
-	public void testUpdateUserDetailsJson() {
+	public void testUpdateUserDetailsJson() throws KustvaktException{
 		String enc = BasicHttpAuth.encode(credentials[0], credentials[1]);
 		Map m = new LinkedMap();
 		m.put("firstName", "newName");
@@ -329,7 +329,7 @@
 
 	@Test
 	@Ignore
-	public void testUpdateUserSettingsForm() throws IOException {
+	public void testUpdateUserSettingsForm() throws IOException, KustvaktException{
 		String enc = BasicHttpAuth.encode(credentials[0], credentials[1]);
 		MultivaluedMap m = new MultivaluedMapImpl();
 		m.putSingle("queryLanguage", "poliqarp_test");
@@ -367,7 +367,7 @@
 	}
 
 	@Test
-	public void testUpdateUserSettingsJson() throws IOException {
+	public void testUpdateUserSettingsJson() throws IOException, KustvaktException {
 		String enc = BasicHttpAuth.encode(credentials[0], credentials[1]);
 		Map m = new HashMap<>();
 		m.put("queryLanguage", "poliqarp_test");
diff --git a/full/src/test/resources/test-config.xml b/full/src/test/resources/test-config.xml
index c5c47af..43cc494 100644
--- a/full/src/test/resources/test-config.xml
+++ b/full/src/test/resources/test-config.xml
@@ -160,6 +160,11 @@
 	<bean id="kustvakt_auditing" class="de.ids_mannheim.korap.handlers.JDBCAuditing">
 		<constructor-arg ref="kustvakt_db" />
 	</bean>
+	
+	<bean id="kustvakt_response"
+          class="de.ids_mannheim.korap.web.utils.KustvaktResponseHandler">
+          <constructor-arg index="0" name="iface" ref="kustvakt_auditing"/>
+    </bean>
 
 	<bean id="kustvakt_userdb" class="de.ids_mannheim.korap.handlers.EntityDao">
 		<constructor-arg ref="kustvakt_db" />
