diff --git a/src/test/java/DemoUserTest.java b/src/test/java/DemoUserTest.java
new file mode 100644
index 0000000..1387ead
--- /dev/null
+++ b/src/test/java/DemoUserTest.java
@@ -0,0 +1,65 @@
+import com.sun.jersey.api.client.ClientResponse;
+import de.ids_mannheim.korap.config.BeansFactory;
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.web.service.FastJerseyTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * @author hanl
+ * @date 04/02/2016
+ */
+public class DemoUserTest extends FastJerseyTest {
+
+    @Override
+    public void initMethod () throws KustvaktException {
+        helper().setupAccount();
+        BeansFactory.setKustvaktContext(helper().getContext());
+    }
+
+
+    @BeforeClass
+    public static void setup () throws Exception {
+        FastJerseyTest.setPackages("de.ids_mannheim.korap.web.service.full",
+                "de.ids_mannheim.korap.web.filter",
+                "de.ids_mannheim.korap.web.utils");
+    }
+
+
+    @Test
+    public void testDemoCollectionGet () {
+        //        ClientResponse response = resource().path(getVersion())
+        //                .path("collection").path("i");
+    }
+
+
+    @Test
+    public void testDemoUserInfoGet () {
+
+    }
+
+
+    @Test
+    public void testDemoUserDetailsGet () {
+
+    }
+
+
+    @Test
+    public void testDemoUserSettingsGet () {
+
+    }
+
+
+    @Test
+    public void testSearch () {
+        ClientResponse response = resource().path(getAPIVersion())
+                .path("search").queryParam("q", "[base=Wort]")
+                .queryParam("ql", "poliqarp").get(ClientResponse.class);
+
+        System.out.println("_____________________________");
+        System.out.println(response);
+        System.out.println("entity " + response.getEntity(String.class));
+    }
+
+}
diff --git a/src/test/java/JerseyTest1.java b/src/test/java/JerseyTest1.java
new file mode 100644
index 0000000..dc0ca87
--- /dev/null
+++ b/src/test/java/JerseyTest1.java
@@ -0,0 +1,48 @@
+import com.sun.jersey.api.client.ClientResponse;
+import com.sun.jersey.test.framework.JerseyTest;
+import com.sun.jersey.test.framework.spi.container.TestContainerFactory;
+import com.sun.jersey.test.framework.spi.container.grizzly.web.GrizzlyWebTestContainerFactory;
+import de.ids_mannheim.korap.config.BeansFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * @author hanl
+ * @date 29/07/2015
+ */
+@Deprecated
+public class JerseyTest1 extends JerseyTest {
+
+    public JerseyTest1 () {
+        super("de.ids_mannheim.korap.web.service",
+                "de.ids_mannheim.korap.web.utils");
+    }
+
+
+    @BeforeClass
+    public static void setup () {
+        BeansFactory.loadClasspathContext();
+    }
+
+
+    @AfterClass
+    public static void close () {
+        BeansFactory.closeApplication();
+    }
+
+
+    @Override
+    protected TestContainerFactory getTestContainerFactory () {
+        return new GrizzlyWebTestContainerFactory();
+    }
+
+
+    @Test
+    public void testFieldsInSearch () {
+        ClientResponse response = resource().path("v0.1/search")
+                .queryParam("q", "[base=Wort]").queryParam("ql", "poliqarp")
+                .get(ClientResponse.class);
+        System.out.println("response " + response);
+    }
+}
diff --git a/src/test/java/KoralNodeTest.java b/src/test/java/KoralNodeTest.java
new file mode 100644
index 0000000..d8f5ab1
--- /dev/null
+++ b/src/test/java/KoralNodeTest.java
@@ -0,0 +1,48 @@
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import de.ids_mannheim.korap.resource.rewrite.KoralNode;
+import de.ids_mannheim.korap.utils.JsonUtils;
+import org.junit.Test;
+
+/**
+ * @author hanl
+ * @date 21/10/2015
+ */
+public class KoralNodeTest {
+
+    // todo: 21.10.15 --> e.g. injection does not tell you if an entire node was injected, or just a value!
+    @Test
+    public void addToNode () {
+        ObjectNode node = JsonUtils.createObjectNode();
+        KoralNode knode = KoralNode.wrapNode(node);
+        knode.put("value_1", "setting_1");
+
+        System.out.println(knode.rawNode().toString());
+    }
+
+
+    @Test
+    public void removeFromNode () {
+        ObjectNode node = JsonUtils.createObjectNode();
+        node.put("value_1", "setting_1");
+        KoralNode knode = KoralNode.wrapNode(node);
+        knode.remove("value_1");
+        System.out.println(knode.rawNode().toString());
+    }
+
+
+    @Test
+    public void replaceObject () {
+        ObjectNode node = JsonUtils.createObjectNode();
+        node.put("value_1", "setting_1");
+        KoralNode knode = KoralNode.wrapNode(node);
+        knode.replace("value_1", "settings_2");
+        System.out.println(knode.rawNode().toString());
+    }
+
+
+    // todo: 21.10.15 --> if a node is injected, that node must contain a "rewrites" reference?!
+    @Test
+    public void addNodeToKoral () {
+
+    }
+}
diff --git a/src/test/java/LocalQueryTest.java b/src/test/java/LocalQueryTest.java
new file mode 100644
index 0000000..0f9d007
--- /dev/null
+++ b/src/test/java/LocalQueryTest.java
@@ -0,0 +1,79 @@
+import de.ids_mannheim.korap.KrillCollection;
+import de.ids_mannheim.korap.config.BeanConfigTest;
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.query.serialize.CollectionQueryProcessor;
+import de.ids_mannheim.korap.utils.KoralCollectionQueryBuilder;
+import de.ids_mannheim.korap.utils.JsonUtils;
+import de.ids_mannheim.korap.web.SearchKrill;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.io.IOException;
+
+/**
+ * @author hanl
+ * @date 14/01/2016
+ */
+public class LocalQueryTest extends BeanConfigTest {
+
+    private static String index;
+    private static String qstring;
+
+
+    @BeforeClass
+    public static void setup () throws Exception {
+        qstring = "creationDate since 1786 & creationDate until 1788";
+        //        qstring = "creationDate since 1765 & creationDate until 1768";
+        //        qstring = "textType = Aphorismus";
+        //        qstring = "title ~ \"Werther\"";
+    }
+
+
+    @AfterClass
+    public static void drop () {}
+
+
+    @Test
+    public void testQuery () {
+        SearchKrill krill = new SearchKrill(index);
+        KoralCollectionQueryBuilder coll = new KoralCollectionQueryBuilder();
+        coll.with(qstring);
+        String stats = krill.getStatistics(coll.toJSON());
+        assert stats != null && !stats.isEmpty() && !stats.equals("null");
+    }
+
+
+    @Test
+    public void testCollQuery () throws IOException {
+        CollectionQueryProcessor processor = new CollectionQueryProcessor();
+        processor.process(qstring);
+
+        String s = JsonUtils.toJSON(processor.getRequestMap());
+        KrillCollection c = new KrillCollection(s);
+        c.setIndex(new SearchKrill(index).getIndex());
+        long docs = c.numberOf("documents");
+        assert docs > 0 && docs < 15;
+    }
+
+
+    @Test
+    public void testCollQuery2 () throws IOException {
+        String query = "{\"@context\":\"http://korap.ids-mannheim.de/ns/koral/0.3/context.jsonld\",\"errors\":[],\"warnings\":[],\"messages\":[],\"collection\":{\"@type\":\"koral:docGroup\",\"operation\":\"operation:and\",\"operands\":[{\"@type\":\"koral:doc\",\"key\":\"creationDate\",\"type\":\"type:date\",\"value\":\"1786\",\"match\":\"match:geq\"},{\"@type\":\"koral:doc\",\"key\":\"creationDate\",\"type\":\"type:date\",\"value\":\"1788\",\"match\":\"match:leq\"}]},\"query\":{},\"meta\":{}}";
+        KrillCollection c = new KrillCollection(query);
+        c.setIndex(new SearchKrill(index).getIndex());
+        long sent = c.numberOf("base/sentences");
+        long docs = c.numberOf("documents");
+    }
+
+
+    @Test
+    public void testQueryHash () {}
+
+
+    @Override
+    public void initMethod () throws KustvaktException {
+        helper().runBootInterfaces();
+        index = helper().getContext().getConfiguration().getIndexDir();
+    }
+}
diff --git a/src/test/java/MetaQueryBuilderTest.java b/src/test/java/MetaQueryBuilderTest.java
new file mode 100644
index 0000000..4bdbedc
--- /dev/null
+++ b/src/test/java/MetaQueryBuilderTest.java
@@ -0,0 +1,30 @@
+import de.ids_mannheim.korap.config.QueryBuilderUtil;
+import de.ids_mannheim.korap.query.serialize.MetaQueryBuilder;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Created by hanl on 17.04.16.
+ */
+public class MetaQueryBuilderTest {
+
+
+
+    @Test
+    public void testSpanContext () {
+        System.out.println("____________________-");
+        MetaQueryBuilder m = QueryBuilderUtil.defaultMetaBuilder(0, 1, 5,
+                "sentence", false);
+        Map map = m.raw();
+
+        assertEquals("sentence", map.get("context"));
+        assertEquals(1, map.get("startPage"));
+        assertEquals(0, map.get("startIndex"));
+        assertEquals(false, map.get("cufOff"));
+
+    }
+}
diff --git a/src/test/java/PublicAPITest.java b/src/test/java/PublicAPITest.java
new file mode 100644
index 0000000..1bc282b
--- /dev/null
+++ b/src/test/java/PublicAPITest.java
@@ -0,0 +1,42 @@
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.web.service.FastJerseyTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Created by hanl on 17.04.16.
+ */
+public class PublicAPITest extends FastJerseyTest {
+
+
+    @BeforeClass
+    public static void setup () {
+        FastJerseyTest.setPackages("de.ids_mannheim.korap.web.service.light",
+                "de.ids_mannheim.korap.web.filter",
+                "de.ids_mannheim.korap.web.utils");
+    }
+
+
+    @Override
+    public void initMethod () throws KustvaktException {}
+
+
+    @Test
+    public void testContextSpanSent () {
+
+    }
+
+
+    @Test
+    public void testContextSpanPara () {
+
+    }
+
+
+    @Test
+    public void testSimpleSearch () {
+
+    }
+
+
+}
diff --git a/src/test/java/ScopesTest.java b/src/test/java/ScopesTest.java
new file mode 100644
index 0000000..af84402
--- /dev/null
+++ b/src/test/java/ScopesTest.java
@@ -0,0 +1,19 @@
+import org.junit.Test;
+
+/**
+ * @author hanl
+ * @date 20/01/2016
+ */
+public class ScopesTest {
+
+    @Test
+    public void testScopes () {
+
+    }
+
+
+    @Test
+    public void testOpenIDScopes () {
+
+    }
+}
diff --git a/src/test/java/SerializationTest.java b/src/test/java/SerializationTest.java
new file mode 100644
index 0000000..334982a
--- /dev/null
+++ b/src/test/java/SerializationTest.java
@@ -0,0 +1,21 @@
+import org.junit.Test;
+
+/**
+ * @author hanl
+ * @date 21/01/2016
+ */
+public class SerializationTest {
+
+    @Test
+    public void testSettingsObject () {
+        String t = "poliqarp_test";
+
+        //        UserSettings s = new UserSettings();
+        //        Map map = s.toObjectMap();
+        //        map.put(Attributes.QUERY_LANGUAGE, t);
+        //        s.updateObjectSettings(map);
+        //
+        //        assert s.getQueryLanguage().equals(t);
+
+    }
+}
diff --git a/src/test/java/ServiceSuite.java b/src/test/java/ServiceSuite.java
new file mode 100644
index 0000000..f13b776
--- /dev/null
+++ b/src/test/java/ServiceSuite.java
@@ -0,0 +1,11 @@
+import de.ids_mannheim.korap.config.ConfigTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * @author hanl
+ * @date 29/02/2016
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({ ConfigTest.class })
+public class ServiceSuite {}
diff --git a/src/test/java/TestNullableSqls.java b/src/test/java/TestNullableSqls.java
new file mode 100644
index 0000000..a220233
--- /dev/null
+++ b/src/test/java/TestNullableSqls.java
@@ -0,0 +1,5 @@
+/**
+ * @author hanl
+ * @date 30/01/2016
+ */
+public class TestNullableSqls {}
diff --git a/src/test/java/TestUtil.java b/src/test/java/TestUtil.java
new file mode 100644
index 0000000..1fb3ce7
--- /dev/null
+++ b/src/test/java/TestUtil.java
@@ -0,0 +1,62 @@
+import de.ids_mannheim.korap.config.Attributes;
+import de.ids_mannheim.korap.utils.SqlBuilder;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author hanl
+ * @date 26/11/2015
+ */
+public class TestUtil {
+
+    @Test
+    public void testSqlBuilderSELECT () {
+        SqlBuilder b = new SqlBuilder("users");
+        b.select(Attributes.USERNAME, Attributes.PASSWORD).where(
+                Attributes.USERNAME + "=?");
+        Assert.assertEquals("query does not match",
+                "SELECT username, password FROM users WHERE username=?;",
+                b.toString());
+    }
+
+
+    @Test
+    public void testSqlBuilderINSERT () {
+        SqlBuilder b = new SqlBuilder("users");
+        b.insert(Attributes.USERNAME, Attributes.PASSWORD).params("user",
+                "pass");
+        Assert.assertEquals("query does not match",
+                "INSERT INTO users (username, password) VALUES (user, pass);",
+                b.toString());
+    }
+
+
+    @Test
+    public void testSqlBuilderINSERTExcludeWhere () {
+        SqlBuilder b = new SqlBuilder("users");
+        b.insert(Attributes.USERNAME, Attributes.PASSWORD)
+                .params("user", "pass").where("some=?");
+        Assert.assertEquals("query does not match",
+                "INSERT INTO users (username, password) VALUES (user, pass);",
+                b.toString());
+    }
+
+
+    @Test
+    public void testSqlBuilderDELETE () {
+        SqlBuilder b = new SqlBuilder("users");
+        b.delete().where(Attributes.PERSISTENT_ID + "=?");
+        Assert.assertEquals("query does not match",
+                "DELETE FROM users WHERE persistent_id=?;", b.toString());
+    }
+
+
+    @Test
+    public void testSqlBuilderUPDATE () {
+        SqlBuilder b = new SqlBuilder("users");
+        b.update(Attributes.USERNAME, Attributes.PASSWORD).params("user",
+                "pass");
+        Assert.assertEquals("query does not match",
+                "UPDATE users SET username=user, password=pass;", b.toString());
+    }
+}
diff --git a/src/test/java/de/ids_mannheim/korap/config/BeanConfigTest.java b/src/test/java/de/ids_mannheim/korap/config/BeanConfigTest.java
new file mode 100644
index 0000000..266b784
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/config/BeanConfigTest.java
@@ -0,0 +1,96 @@
+package de.ids_mannheim.korap.config;
+
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import net.jcip.annotations.NotThreadSafe;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runner.notification.RunNotifier;
+import org.junit.runners.model.InitializationError;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationContext;
+import org.springframework.test.annotation.DirtiesContext;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import javax.annotation.PostConstruct;
+
+import static org.junit.Assert.assertNotNull;
+
+/**
+ * @author hanl
+ * @date 09/03/2016
+ */
+@NotThreadSafe
+@RunWith(BeanConfigTest.SpringExtendedSetupListener.class)
+@ContextConfiguration(classes = TestHelper.AppTestConfig.class)
+@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS)
+public abstract class BeanConfigTest {
+
+    @Autowired
+    private ApplicationContext context;
+
+
+    public void init () throws Exception {
+        assertNotNull("Application context must not be null!", this.context);
+        System.out.println("running one-time before init for class "
+                + this.getClass().getSimpleName() + " ...");
+        initMethod();
+        BeansFactory.setKustvaktContext(helper().getContext());
+    }
+
+
+    public void close () {
+        BeansFactory.closeApplication();
+    }
+
+
+    public abstract void initMethod () throws KustvaktException;
+
+
+    protected TestHelper helper () {
+        try {
+            return TestHelper.newInstance(this.context);
+        }
+        catch (Exception e) {
+            return null;
+        }
+    }
+
+
+    public static class SpringExtendedSetupListener extends
+            SpringJUnit4ClassRunner {
+
+        private BeanConfigTest instanceSetupListener;
+
+
+        public SpringExtendedSetupListener (Class<?> clazz)
+                throws InitializationError {
+            super(clazz);
+        }
+
+
+        @Override
+        protected Object createTest () throws Exception {
+            Object test = super.createTest();
+            // Note that JUnit4 will call this createTest() multiple times for each
+            // test method, so we need to ensure to call "beforeClassSetup" only once.
+            if (test instanceof BeanConfigTest && instanceSetupListener == null) {
+                instanceSetupListener = (BeanConfigTest) test;
+                instanceSetupListener.init();
+            }
+            return test;
+        }
+
+
+        @Override
+        public void run (RunNotifier notifier) {
+            super.run(notifier);
+            if (instanceSetupListener != null)
+                instanceSetupListener.close();
+        }
+
+
+    }
+}
diff --git a/src/test/java/de/ids_mannheim/korap/config/EsapiTest.java b/src/test/java/de/ids_mannheim/korap/config/EsapiTest.java
new file mode 100644
index 0000000..5d26cd7
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/config/EsapiTest.java
@@ -0,0 +1,54 @@
+package de.ids_mannheim.korap.config;
+
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.interfaces.EncryptionIface;
+import org.junit.Test;
+
+import java.util.Map;
+
+import static org.junit.Assert.*;
+
+/**
+ * @author hanl
+ * @date 08/01/2016
+ */
+public class EsapiTest extends BeanConfigTest {
+
+    @Test
+    public void testInputPassword () throws KustvaktException {
+        String pass = TestHelper.getUserCredentials()[1];
+        EncryptionIface cr = helper().getContext().getEncryption();
+        String spass = cr.validateEntry(pass, Attributes.PASSWORD);
+        assertNotNull(spass);
+        assertFalse(spass.isEmpty());
+    }
+
+
+    @Test
+    public void testMapValidation () throws KustvaktException {
+        int exp_size = KustvaktConfiguration.KUSTVAKT_USER.size();
+        Map map = helper().getContext().getEncryption()
+                .validateMap(KustvaktConfiguration.KUSTVAKT_USER);
+        assertEquals(exp_size, map.size());
+    }
+
+
+    @Test
+    public void testUsernameValidation () throws KustvaktException {
+        String sus = helper()
+                .getContext()
+                .getEncryption()
+                .validateEntry(
+                        (String) KustvaktConfiguration.KUSTVAKT_USER
+                                .get(Attributes.USERNAME),
+                        Attributes.USERNAME);
+        assertNotNull(sus);
+        assertFalse(sus.isEmpty());
+    }
+
+
+    @Override
+    public void initMethod () throws KustvaktException {
+
+    }
+}
diff --git a/src/test/java/de/ids_mannheim/korap/config/KustvaktResourceTest.java b/src/test/java/de/ids_mannheim/korap/config/KustvaktResourceTest.java
new file mode 100644
index 0000000..4222f88
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/config/KustvaktResourceTest.java
@@ -0,0 +1,31 @@
+package de.ids_mannheim.korap.config;
+
+import de.ids_mannheim.korap.resources.KustvaktResource;
+import de.ids_mannheim.korap.resources.VirtualCollection;
+
+/**
+ * @author hanl
+ * @date 11/02/2016
+ */
+public class KustvaktResourceTest {
+
+
+    public void testIDCreation () {
+        KustvaktResource resource = new VirtualCollection(1);
+        resource.addField("field_1", "data");
+
+    }
+
+
+    public void testNullableData () {
+
+    }
+
+
+    public void testWrongDataType () {
+
+    }
+
+
+
+}
diff --git a/src/test/java/de/ids_mannheim/korap/config/LoaderTest.java b/src/test/java/de/ids_mannheim/korap/config/LoaderTest.java
new file mode 100644
index 0000000..ce4de02
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/config/LoaderTest.java
@@ -0,0 +1,89 @@
+package de.ids_mannheim.korap.config;
+
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.web.service.BootableBeanInterface;
+import de.ids_mannheim.korap.web.service.CollectionLoader;
+import de.ids_mannheim.korap.web.service.PolicyLoader;
+import de.ids_mannheim.korap.web.service.UserLoader;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+
+/**
+ * @author hanl
+ * @date 12/02/2016
+ */
+public class LoaderTest extends BeanConfigTest {
+
+    @Test
+    @Ignore
+    public void testConfigOrder () {
+        System.out.println("done ...");
+
+        List s = new ArrayList<>();
+        s.add("new");
+        s.add("new2");
+    }
+
+
+    @Override
+    public void initMethod () throws KustvaktException {}
+
+
+    @Test
+    public void runBootInterfaces () {
+        Set<Class<? extends BootableBeanInterface>> set = new HashSet<>();
+        set.add(CollectionLoader.class);
+        set.add(PolicyLoader.class);
+        set.add(UserLoader.class);
+
+        List<BootableBeanInterface> list = new ArrayList<>(set.size());
+        for (Class cl : set) {
+            BootableBeanInterface iface;
+            try {
+                iface = (BootableBeanInterface) cl.newInstance();
+                list.add(iface);
+            }
+            catch (InstantiationException | IllegalAccessException e) {
+                // do nothing
+            }
+        }
+        assertEquals(set.size(), list.size());
+        List tracer = new ArrayList();
+        System.out.println("Found boot loading interfaces: " + list);
+        while (!set.isEmpty()) {
+            out_loop: for (BootableBeanInterface iface : new ArrayList<>(list)) {
+                try {
+                    System.out.println("Running boot instructions from class "
+                            + iface.getClass().getSimpleName());
+                    for (Class cl : iface.getDependencies()) {
+                        if (set.contains(cl))
+                            continue out_loop;
+                    }
+                    set.remove(iface.getClass());
+                    list.remove(iface);
+                    iface.load(helper().getContext());
+                    tracer.add(iface.getClass());
+                }
+                catch (KustvaktException e) {
+                    // don't do anything!
+                    System.out.println("An error occurred in class "
+                            + iface.getClass().getSimpleName() + "!\n" + e);
+                    throw new RuntimeException(
+                            "Boot loading interface failed ...");
+                }
+            }
+        }
+        assertEquals(0, tracer.indexOf(UserLoader.class));
+        assertNotEquals(0, tracer.indexOf(CollectionLoader.class));
+        assertNotEquals(0, tracer.indexOf(PolicyLoader.class));
+    }
+
+}
diff --git a/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java b/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java
index 4e4aa3f..fbf88c0 100644
--- a/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java
+++ b/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java
@@ -6,11 +6,9 @@
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
 import de.ids_mannheim.korap.resources.Corpus;
-import de.ids_mannheim.korap.resources.KustvaktResource;
 import de.ids_mannheim.korap.security.ac.ResourceFinder;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.JsonUtils;
-import org.junit.Assert;
 import org.junit.Test;
 
 import java.util.Set;
@@ -58,14 +56,19 @@
         handler.add(CollectionConstraint.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(simple_add_query, "poliqarp");
-        s.setCollection("textClass=politik & corpusID=WPD");
+        s.setCollection("textClass=politik & corpusSigle=WPD");
         String result = s.toJSON();
-        JsonNode node = JsonUtils.readTree(handler.preProcess(result,
+        JsonNode node = JsonUtils.readTree(handler.process(result,
                 User.UserFactory.getUser("test_user")));
         assertNotNull(node);
         assertEquals(1, node.at("/collection/operands").size());
     }
 
+    @Test
+    public void testCollectionNodeDeletionNotification() {
+
+    }
+
 
     @Test
     public void testCollectionNodeRemoveAllCorpusIdNoErrors () {
@@ -74,9 +77,9 @@
         handler.add(CollectionConstraint.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(simple_add_query, "poliqarp");
-        s.setCollection("corpusID=BRZ13 & corpusID=WPD");
+        s.setCollection("corpusSigle=BRZ13 & corpusSigle=WPD");
         String result = s.toJSON();
-        JsonNode node = JsonUtils.readTree(handler.preProcess(result,
+        JsonNode node = JsonUtils.readTree(handler.process(result,
                 User.UserFactory.getUser("test_user")));
         //        System.out.println("RESULTING REWR NODE " + node);
         assertNotNull(node);
@@ -91,9 +94,9 @@
         handler.add(CollectionConstraint.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(simple_add_query, "poliqarp");
-        s.setCollection("(corpusID=BRZ13 & textClass=Wissenschaft) & corpusID=WPD");
+        s.setCollection("(corpusSigle=BRZ13 & textClass=Wissenschaft) & corpusSigle=WPD");
         String result = s.toJSON();
-        JsonNode node = JsonUtils.readTree(handler.preProcess(result,
+        JsonNode node = JsonUtils.readTree(handler.process(result,
                 User.UserFactory.getUser("test_user")));
 
         assertNotNull(node);
@@ -113,11 +116,13 @@
         handler.add(CollectionCleanupFilter.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(simple_add_query, "poliqarp");
-        s.setCollection("(corpusID=BRZ13 & corpusID=WPD) & textClass=Wissenschaft & textClass=Sport");
+        s.setCollection("(corpusSigle=BRZ13 & corpusSigle=WPD) & textClass=Wissenschaft & textClass=Sport");
         String result = s.toJSON();
-        JsonNode node = JsonUtils.readTree(handler.preProcess(result,
+
+        JsonNode node = JsonUtils.readTree(handler.process(result,
                 User.UserFactory.getUser("test_user")));
 
+
         assertNotNull(node);
         assertEquals("koral:docGroup", node.at("/collection/@type").asText());
         assertEquals(2, node.at("/collection/operands").size());
@@ -137,9 +142,9 @@
         handler.add(CollectionCleanupFilter.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(simple_add_query, "poliqarp");
-        s.setCollection("(corpusID=BRZ13 & textClass=Wissenschaft)");
+        s.setCollection("(corpusSigle=BRZ13 & textClass=Wissenschaft)");
         String result = s.toJSON();
-        JsonNode node = JsonUtils.readTree(handler.preProcess(result,
+        JsonNode node = JsonUtils.readTree(handler.process(result,
                 User.UserFactory.getUser("test_user")));
         assertNotNull(node);
         assertEquals("koral:doc", node.at("/collection/@type").asText());
@@ -154,9 +159,9 @@
         handler.add(CollectionCleanupFilter.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(simple_add_query, "poliqarp");
-        s.setCollection("(corpusID=BRZ13 & corpusID=WPD) & textClass=Wissenschaft");
+        s.setCollection("(corpusSigle=BRZ13 & corpusSigle=WPD) & textClass=Wissenschaft");
         String result = s.toJSON();
-        JsonNode node = JsonUtils.readTree(handler.preProcess(result,
+        JsonNode node = JsonUtils.readTree(handler.process(result,
                 User.UserFactory.getUser("test_user")));
 
         assertNotNull(node);
@@ -173,11 +178,11 @@
         handler.add(CollectionCleanupFilter.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(simple_add_query, "poliqarp");
-        s.setCollection("(docID=random & textClass=Wissenschaft) & corpusID=WPD");
+        s.setCollection("(docID=random & textClass=Wissenschaft) & corpusSigle=WPD");
         String org = s.toJSON();
-        JsonNode node = JsonUtils.readTree(handler.preProcess(org,
+        JsonNode node = JsonUtils.readTree(handler.process(org,
                 User.UserFactory.getUser("test_user")));
-
+        System.out.println(node);
         assertNotNull(node);
         assertEquals("koral:docGroup", node.at("/collection/@type").asText());
         assertEquals(2, node.at("/collection/operands").size());
@@ -195,10 +200,12 @@
         QuerySerializer s = new QuerySerializer();
         s.setQuery(simple_add_query, "poliqarp");
         String org = s.toJSON();
-        JsonNode node = JsonUtils.readTree(handler.preProcess(org,
+        JsonNode node = JsonUtils.readTree(handler.process(org,
                 User.UserFactory.getUser("test_user")));
         assertNotNull(node);
-        System.out.println("EMPTY " + node);
+        assertEquals("corpusSigle", node.at("/collection/operands/0/key").asText());
+        assertEquals("corpusSigle", node.at("/collection/operands/1/key").asText());
+        assertEquals("koral:rewrite", node.at("/collection/rewrites/@type").asText());
     }
 
 
@@ -214,11 +221,14 @@
             s.setQuery(simple_add_query, "poliqarp");
             s.setCollection("(docSigle=WPD_AAA & textClass=wissenschaft)");
             String org = s.toJSON();
-            JsonNode node = JsonUtils.readTree(handler.preProcess(org,
+            JsonNode node = JsonUtils.readTree(handler.process(org,
                     User.UserFactory.getUser("test_user")));
             assertNotNull(node);
-            System.out.println("NON EMPTY " + node);
-            Set<Corpus> resourceSet = ResourceFinder.searchPublic(Corpus.class);
+            assertEquals(2, node.at("/collection/operands").size());
+            assertEquals("corpusSigle", node.at("/collection/operands/1/operands/0/key").asText());
+            assertEquals("corpusSigle", node.at("/collection/operands/1/operands/1/key").asText());
+            assertEquals("koral:rewrite", node.at("/collection/rewrites/@type").asText());
+
         }
         catch (Exception e) {
             e.printStackTrace();
diff --git a/src/test/java/de/ids_mannheim/korap/resource/rewrite/FoundryRewriteTest.java b/src/test/java/de/ids_mannheim/korap/resource/rewrite/FoundryRewriteTest.java
index 032b9f7..92ef92c 100644
--- a/src/test/java/de/ids_mannheim/korap/resource/rewrite/FoundryRewriteTest.java
+++ b/src/test/java/de/ids_mannheim/korap/resource/rewrite/FoundryRewriteTest.java
@@ -21,7 +21,7 @@
  * @author hanl
  * @date 18/06/2015
  */
-//todo: refactor and structure tests
+//todo: check position and information of rewrites!
 public class FoundryRewriteTest extends BeanConfigTest {
 
     private static String simple_add_query = "[pos=ADJA]";
@@ -63,9 +63,10 @@
         processor.add(FoundryInject.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[base=Haus]", "poliqarp");
-        String result = processor.preProcess(s.toJSON(), null);
+        String result = processor.process(s.toJSON(), null);
         JsonNode node = JsonUtils.readTree(result);
 
+        System.out.println("REWRITTEN "+ node);
         assertNotNull(node);
         assertFalse(node.at("/query/wrap/foundry").isMissingNode());
         assertEquals(c.getDefault_lemma(), node.at("/query/wrap/foundry")
@@ -88,7 +89,7 @@
         handler.insertBeans(helper().getContext());
         s.setQuery("[pos=ADJA]", "poliqarp");
         assertTrue(handler.add(FoundryInject.class));
-        String result = handler.preProcess(s.toJSON(), null);
+        String result = handler.process(s.toJSON(), null);
         JsonNode node = JsonUtils.readTree(result);
 
         assertNotNull(node);
@@ -113,7 +114,7 @@
         handler.add(FoundryInject.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[pos=ADJA]", "poliqarp");
-        String result = handler.preProcess(s.toJSON(), user);
+        String result = handler.process(s.toJSON(), user);
         JsonNode node = JsonUtils.readTree(result);
 
         UserDataDbIface dao = BeansFactory.getTypeFactory().getTypedBean(
@@ -143,7 +144,7 @@
         handler.add(FoundryInject.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[base=Haus]", "poliqarp");
-        String result = handler.preProcess(s.toJSON(), user);
+        String result = handler.process(s.toJSON(), user);
         JsonNode node = JsonUtils.readTree(result);
 
         UserDataDbIface dao = BeansFactory.getTypeFactory().getTypedBean(
@@ -171,7 +172,7 @@
         handler.insertBeans(helper().getContext());
         s.setQuery("[orth=laufe/i & base!=Lauf]", "poliqarp");
         assertTrue(handler.add(FoundryInject.class));
-        String result = handler.preProcess(s.toJSON(), null);
+        String result = handler.process(s.toJSON(), null);
         JsonNode node = JsonUtils.readTree(result);
 
         assertNotNull(node);
@@ -190,7 +191,7 @@
         handler.insertBeans(helper().getContext());
         s.setQuery("[(base=laufen | base=gehen) & tt/pos=VVFIN]", "poliqarp");
         assertTrue(handler.add(FoundryInject.class));
-        String result = handler.preProcess(s.toJSON(), null);
+        String result = handler.process(s.toJSON(), null);
         JsonNode node = JsonUtils.readTree(result);
 
         assertNotNull(node);
diff --git a/src/test/java/de/ids_mannheim/korap/resource/rewrite/IdRewriteTest.java b/src/test/java/de/ids_mannheim/korap/resource/rewrite/IdRewriteTest.java
index 2f069f1..909f9c9 100644
--- a/src/test/java/de/ids_mannheim/korap/resource/rewrite/IdRewriteTest.java
+++ b/src/test/java/de/ids_mannheim/korap/resource/rewrite/IdRewriteTest.java
@@ -25,7 +25,7 @@
         QuerySerializer s = new QuerySerializer();
         s.setQuery(query, "poliqarp");
 
-        String value = handler.preProcess(s.toJSON(), null);
+        String value = handler.process(s.toJSON(), null);
         JsonNode result = JsonUtils.readTree(value);
 
         assertNotNull(result);
@@ -41,7 +41,7 @@
 
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[base=Haus]", "poliqarp");
-        String result = handler.preProcess(s.toJSON(), null);
+        String result = handler.process(s.toJSON(), null);
         JsonNode node = JsonUtils.readTree(result);
         assertNotNull(node);
         assertFalse(node.at("/query/wrap").isMissingNode());
diff --git a/src/test/java/de/ids_mannheim/korap/resource/rewrite/PostRewriteTest.java b/src/test/java/de/ids_mannheim/korap/resource/rewrite/PostRewriteTest.java
index 78db747..ef0c10a 100644
--- a/src/test/java/de/ids_mannheim/korap/resource/rewrite/PostRewriteTest.java
+++ b/src/test/java/de/ids_mannheim/korap/resource/rewrite/PostRewriteTest.java
@@ -47,7 +47,7 @@
         try {
             Document d = dao.findbyId("BRZ13_APR.00014", null);
             assertNull(d);
-            String v = ha.postProcess(RESULT, null);
+            String v = ha.process(RESULT, null);
             assertEquals("results do not match", JsonUtils.readTree(RESULT),
                     JsonUtils.readTree(v));
         }
@@ -76,7 +76,7 @@
         assertEquals("Handler could not be added to rewriter instance!", true,
                 ha.add(DocMatchRewrite.class));
 
-        String v = ha.postProcess(RESULT, null);
+        String v = ha.process(RESULT, null);
 
         JsonNode node = JsonUtils.readTree(v);
 
diff --git a/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandlerTest.java b/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandlerTest.java
index 070e0bb..15df2a9 100644
--- a/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandlerTest.java
+++ b/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandlerTest.java
@@ -51,7 +51,7 @@
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[(base=laufen | base=gehen) & tt/pos=VVFIN]", "poliqarp");
         assertTrue(handler.add(FoundryInject.class));
-        handler.preProcess(s.toJSON(), null);
+        handler.process(s.toJSON(), null);
     }
 
 
@@ -62,7 +62,7 @@
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[(base=laufen | base=gehen) & tt/pos=VVFIN]", "poliqarp");
         assertTrue(handler.add(FoundryInject.class));
-        String res = handler.preProcess(s.toJSON(), null);
+        String res = handler.process(s.toJSON(), null);
         assertNotNull(res);
     }
 
@@ -74,7 +74,7 @@
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[(base=laufen | base=gehen) & tt/pos=VVFIN]", "poliqarp");
         assertTrue(handler.add(FoundryInject.class));
-        String res = handler.preProcess(s.toJSON(), null);
+        String res = handler.process(s.toJSON(), null);
         JsonNode node = JsonUtils.readTree(res);
         assertNotNull(node);
 
@@ -93,7 +93,7 @@
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[(base=laufen | base=gehen) & tt/pos=VVFIN]", "poliqarp");
         assertTrue(handler.add(FoundryInject.class));
-        String res = handler.preProcess(s.toJSON(), helper().getUser());
+        String res = handler.process(s.toJSON(), helper().getUser());
         JsonNode node = JsonUtils.readTree(res);
         assertNotNull(node);
         assertEquals("tt_test",
diff --git a/src/test/java/de/ids_mannheim/korap/security/PermissionBufferTest.java b/src/test/java/de/ids_mannheim/korap/security/PermissionBufferTest.java
new file mode 100644
index 0000000..68e874a
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/security/PermissionBufferTest.java
@@ -0,0 +1,209 @@
+package de.ids_mannheim.korap.security;
+
+import de.ids_mannheim.korap.resources.Permissions;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * @author hanl
+ * @date 15/02/2016
+ */
+public class PermissionBufferTest {
+
+    @Test
+    public void testDuplicatePermission () {
+        PermissionsBuffer buffer = new PermissionsBuffer();
+        assertEquals(0, buffer.addPermission(4));
+        assertEquals(-1, buffer.addPermission(4));
+
+        // 0 means permission was successfully added, -1 means it wasn't because it's already present
+        assertEquals(0, buffer.addPermission(1));
+        assertEquals(-1, buffer.addPermission(1));
+
+        assertEquals(0, buffer.addPermission(8));
+        assertEquals(-1, buffer.addPermission(4));
+    }
+
+
+    @Test
+    public void testPermissionsAdd () {
+        PermissionsBuffer buffer = new PermissionsBuffer();
+        buffer.addPermissions(Permissions.Permission.READ);
+        assertEquals(1, buffer.getPermissions().size());
+
+        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
+        assertFalse(buffer
+                .containsPByte(Permissions.Permission.DELETE.toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.READ_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.DELETE_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.CREATE_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.ALL.toByte()));
+
+        buffer = new PermissionsBuffer();
+        buffer.addPermissions(Permissions.Permission.WRITE);
+        buffer.addPermissions(Permissions.Permission.DELETE_POLICY);
+        assertEquals(2, buffer.getPermissions().size());
+        assertFalse(buffer.containsPByte(Permissions.Permission.READ.toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
+        assertFalse(buffer
+                .containsPByte(Permissions.Permission.DELETE.toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.READ_POLICY
+                .toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.CREATE_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.ALL.toByte()));
+    }
+
+
+    @Test
+    public void testPermissionsAddAll2 () {
+        PermissionsBuffer buffer = new PermissionsBuffer();
+        buffer.addPermissions(Permissions.Permission.ALL);
+
+        assertEquals(Permissions.Permission.values().length, buffer
+                .getPermissions().size());
+        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE.toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.READ_POLICY
+                .toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE_POLICY
+                .toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
+                .toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.CREATE_POLICY
+                .toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.ALL.toByte()));
+    }
+
+
+    @Test
+    public void testPermissionsAddAll () {
+        PermissionsBuffer buffer = new PermissionsBuffer();
+        buffer.addPermissions(Permissions.Permission.DELETE_POLICY);
+        buffer.addPermissions(Permissions.Permission.CREATE_POLICY);
+        buffer.addPermissions(Permissions.Permission.READ);
+        buffer.addPermissions(Permissions.Permission.MODIFY_POLICY);
+        buffer.addPermissions(Permissions.Permission.DELETE);
+        buffer.addPermissions(Permissions.Permission.READ_POLICY);
+        buffer.addPermissions(Permissions.Permission.WRITE);
+
+        assertEquals(Permissions.Permission.values().length, buffer
+                .getPermissions().size());
+        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE.toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.READ_POLICY
+                .toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE_POLICY
+                .toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
+                .toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.CREATE_POLICY
+                .toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.ALL.toByte()));
+
+    }
+
+
+    @Test
+    public void testPermissionsInit () {
+        PermissionsBuffer buffer = new PermissionsBuffer((short) 1);
+        assertEquals(1, buffer.getPermissions().size());
+
+        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
+        assertFalse(buffer
+                .containsPByte(Permissions.Permission.DELETE.toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.READ_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.DELETE_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.CREATE_POLICY
+                .toByte()));
+
+    }
+
+
+    @Test
+    public void testPermissionsStringConversion () {
+        PermissionsBuffer buffer = new PermissionsBuffer(Short.valueOf("1"));
+        assertEquals(1, buffer.getPermissions().size());
+
+        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
+        assertFalse(buffer
+                .containsPByte(Permissions.Permission.DELETE.toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.READ_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.DELETE_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.CREATE_POLICY
+                .toByte()));
+
+        buffer = new PermissionsBuffer(Short.valueOf("5"));
+        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE.toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.READ_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.DELETE_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.CREATE_POLICY
+                .toByte()));
+
+        buffer = new PermissionsBuffer(Short.valueOf("69"));
+        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE.toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.READ_POLICY
+                .toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
+                .toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.CREATE_POLICY
+                .toByte()));
+    }
+
+
+    @Test
+    public void testPermissionRemovalOne () {
+        PermissionsBuffer buffer = new PermissionsBuffer();
+        buffer.addPermissions(Permissions.Permission.READ,
+                Permissions.Permission.DELETE,
+                Permissions.Permission.MODIFY_POLICY);
+
+        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE.toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
+                .toByte()));
+
+        buffer.removePermission(Permissions.Permission.MODIFY_POLICY);
+
+        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
+        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE.toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
+        assertFalse(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
+                .toByte()));
+    }
+
+}
diff --git a/src/test/java/de/ids_mannheim/korap/security/PolicyBenchmarkTest.java b/src/test/java/de/ids_mannheim/korap/security/PolicyBenchmarkTest.java
new file mode 100644
index 0000000..6804770
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/security/PolicyBenchmarkTest.java
@@ -0,0 +1,10 @@
+package de.ids_mannheim.korap.security;
+
+/**
+ * @author hanl
+ * @date 09/02/2016
+ */
+public class PolicyBenchmarkTest {
+
+
+}
diff --git a/src/test/java/de/ids_mannheim/korap/security/PolicyBuilderTest.java b/src/test/java/de/ids_mannheim/korap/security/PolicyBuilderTest.java
new file mode 100644
index 0000000..eb0c3d8
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/security/PolicyBuilderTest.java
@@ -0,0 +1,31 @@
+package de.ids_mannheim.korap.security;
+
+import de.ids_mannheim.korap.config.BeanConfigTest;
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.security.ac.PolicyBuilder;
+import org.junit.Test;
+
+/**
+ * @author hanl
+ * @date 20/11/2015
+ */
+public class PolicyBuilderTest extends BeanConfigTest {
+
+    @Test
+    public void testBuild () {
+        PolicyBuilder b = new PolicyBuilder(helper().getUser());
+
+    }
+
+
+    @Override
+    public void initMethod () throws KustvaktException {
+        helper().setupAccount();
+    }
+
+
+    @Test
+    public void testCreateForMultipleResources () {
+        //todo:
+    }
+}
diff --git a/src/test/java/de/ids_mannheim/korap/security/ResourceFinderTest.java b/src/test/java/de/ids_mannheim/korap/security/ResourceFinderTest.java
new file mode 100644
index 0000000..24922e6
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/security/ResourceFinderTest.java
@@ -0,0 +1,44 @@
+package de.ids_mannheim.korap.security;
+
+import de.ids_mannheim.korap.config.BeanConfigTest;
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.resources.Corpus;
+import de.ids_mannheim.korap.resources.VirtualCollection;
+import de.ids_mannheim.korap.security.ac.ResourceFinder;
+import org.junit.Test;
+
+import java.util.Set;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+
+/**
+ * @author hanl
+ * @date 06/02/2016
+ */
+public class ResourceFinderTest extends BeanConfigTest {
+
+    @Test
+    public void searchResources () throws KustvaktException {
+        Set<VirtualCollection> resources = ResourceFinder
+                .searchPublic(VirtualCollection.class);
+        assertFalse(resources.isEmpty());
+        assertEquals(3, resources.size());
+    }
+
+
+    @Test
+    public void searchResourcesDemo () throws KustvaktException {
+        Set<Corpus> resources = ResourceFinder.searchPublic(Corpus.class);
+        assertFalse(resources.isEmpty());
+        assertNotEquals(0, resources.size());
+    }
+
+
+    @Override
+    public void initMethod () throws KustvaktException {
+        helper().setupAccount();
+        helper().runBootInterfaces();
+    }
+}
diff --git a/src/test/java/de/ids_mannheim/korap/security/ResourcesTest.java b/src/test/java/de/ids_mannheim/korap/security/ResourcesTest.java
new file mode 100644
index 0000000..99fd537
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/security/ResourcesTest.java
@@ -0,0 +1,124 @@
+package de.ids_mannheim.korap.security;
+
+import de.ids_mannheim.korap.config.BeanConfigTest;
+import de.ids_mannheim.korap.config.ContextHolder;
+import de.ids_mannheim.korap.config.KustvaktConfiguration;
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.exceptions.NotAuthorizedException;
+import de.ids_mannheim.korap.interfaces.db.EntityHandlerIface;
+import de.ids_mannheim.korap.resources.*;
+import de.ids_mannheim.korap.security.ac.ResourceFinder;
+import de.ids_mannheim.korap.security.ac.ResourceHandler;
+import de.ids_mannheim.korap.security.ac.SecurityManager;
+import de.ids_mannheim.korap.user.User;
+import de.ids_mannheim.korap.utils.TimeUtils;
+import org.joda.time.DateTime;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import java.util.Set;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+
+/**
+ * @author hanl
+ * @date 20/11/2015
+ */
+// todo: run functions without data to check for nullpointers!
+public class ResourcesTest extends BeanConfigTest {
+
+    private static Corpus c1;
+
+
+    @Test
+    public void testCreate () throws KustvaktException {
+        ResourceHandler h = new ResourceHandler();
+        Corpus ncorps = new Corpus("new_wiki");
+        h.storeResources(helper().getUser(), ncorps);
+    }
+
+
+    @Test
+    public void testGet () throws KustvaktException {
+        DateTime beg = new DateTime();
+        ResourceHandler h = new ResourceHandler();
+        Corpus c = h.findbyStrId(c1.getPersistentID(), helper().getUser(),
+                Corpus.class);
+        float end = TimeUtils.floating(beg, new DateTime());
+        System.out.println("END ----------------- : " + end);
+        assertNotNull(c);
+    }
+
+
+    @Test(expected = KustvaktException.class)
+    public void testGetthrowsUnauthorizedException () throws KustvaktException {
+        DateTime beg = new DateTime();
+        ResourceHandler h = new ResourceHandler();
+        Corpus c = h.findbyStrId(c1.getPersistentID(),
+                User.UserFactory.getDemoUser(), Corpus.class);
+        float end = TimeUtils.floating(beg, new DateTime());
+        System.out.println("END ----------------- : " + end);
+        assertNotNull(c);
+    }
+
+
+    // in case of null, should not return nullpointer!
+    @Test(expected = KustvaktException.class)
+    @Ignore
+    public void testCollectionGet () throws KustvaktException {
+        //todo: do use test user!
+        User user = User.UserFactory
+                .toUser(KustvaktConfiguration.KUSTVAKT_USER);
+        EntityHandlerIface ice = helper()
+                .getBean(ContextHolder.KUSTVAKT_USERDB);
+        User test = ice.getAccount(user.getUsername());
+        assertNotNull(test);
+        Set<KustvaktResource> resources = ResourceFinder.search(user,
+                ResourceFactory.getResourceClass("collection"));
+
+        assertFalse(resources.isEmpty());
+        KustvaktResource r = (KustvaktResource) resources.toArray()[0];
+
+        assertNotNull(r);
+        ResourceHandler h = new ResourceHandler();
+        h.findbyStrId(r.getPersistentID(), user, VirtualCollection.class);
+    }
+
+
+    // securitymanager does not allow for anonymous retrieval, only resourcefinder!
+    @Test(expected = NotAuthorizedException.class)
+    public void getResource () throws KustvaktException {
+        User user = User.UserFactory.getDemoUser();
+        SecurityManager m = SecurityManager.findbyId(2, user,
+                Permissions.Permission.READ);
+        m.getResource();
+    }
+
+
+    @Test
+    public void getDemoResources () throws KustvaktException {
+        Set s = ResourceFinder.searchPublic(Corpus.class);
+        assertEquals(2, s.size());
+        s = ResourceFinder.searchPublic(Foundry.class);
+        assertEquals(1, s.size());
+    }
+
+
+    @Test
+    public void getDemoResourceFiltered () throws KustvaktException {
+        Set s = ResourceFinder.searchPublicFiltered(Corpus.class, "WPD");
+        assertEquals(1, s.size());
+    }
+
+
+    @Override
+    public void initMethod () throws KustvaktException {
+        helper().setupAccount();
+        c1 = new Corpus("WPD_test");
+        helper().runBootInterfaces();
+        helper().setupResource(c1);
+    }
+}
diff --git a/src/test/java/de/ids_mannheim/korap/security/SecurityPolicyTest.java b/src/test/java/de/ids_mannheim/korap/security/SecurityPolicyTest.java
new file mode 100644
index 0000000..0235e81
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/security/SecurityPolicyTest.java
@@ -0,0 +1,148 @@
+package de.ids_mannheim.korap.security;
+
+import de.ids_mannheim.korap.config.BeanConfigTest;
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.interfaces.db.PolicyHandlerIface;
+import de.ids_mannheim.korap.resources.Corpus;
+import de.ids_mannheim.korap.resources.Permissions;
+import org.junit.Test;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import static org.junit.Assert.*;
+
+/**
+ * @author hanl
+ * @date 12/02/2016
+ */
+public class SecurityPolicyTest extends BeanConfigTest {
+
+    @Test
+    public void testConditionUpdate () {
+        SecurityPolicy policy = new SecurityPolicy();
+        policy.addNewCondition(new PolicyCondition("test_1"));
+        policy.addNewCondition(new PolicyCondition("test_2"));
+        policy.setCreator(1);
+        policy.setTarget(new Corpus("WPD"));
+        policy.addPermission(Permissions.Permission.READ);
+
+        assertEquals(2, policy.getAdded().size());
+        policy.removeCondition(new PolicyCondition("test_1"));
+        assertEquals(1, policy.getAdded().size());
+    }
+
+
+    @Test
+    public void testConditionMapping () throws KustvaktException {
+        helper().setupResource(new Corpus("WPD_2"));
+        SecurityPolicy policy = new SecurityPolicy();
+        policy.addNewCondition(new PolicyCondition("test_1"));
+        policy.addNewCondition(new PolicyCondition("test_2"));
+        policy.setCreator(1);
+        policy.setTarget(new Corpus("WPD_2"));
+        policy.addPermission(Permissions.Permission.READ);
+
+        PolicyHandlerIface dao = helper().getContext().getPolicyDbProvider();
+        dao.createPolicy(policy, helper().getUser());
+
+        List<SecurityPolicy>[] list = dao.getPolicies("WPD_2", helper()
+                .getUser(), Permissions.Permission.READ.toByte());
+        assertNotNull(list);
+        List<SecurityPolicy> policies = list[0];
+        assertNotNull(policies);
+        assertFalse(policies.isEmpty());
+        assertEquals(2, policies.size());
+        assertTrue(policies.get(0) instanceof SecurityPolicy.OwnerPolicy);
+        policy = policies.get(1);
+        assertEquals(2, policy.getConditions().size());
+        policy.removeCondition(new PolicyCondition("test_1"));
+        assertEquals(1, policy.getRemoved().size());
+        assertTrue(policy.getAdded().isEmpty());
+    }
+
+
+    @Test
+    public void testPersistingPermissionMapping () throws KustvaktException {
+        helper().setupResource(new Corpus("WPD_3"));
+        SecurityPolicy policy = new SecurityPolicy();
+        policy.addNewCondition(new PolicyCondition("test_1"));
+        policy.addNewCondition(new PolicyCondition("test_2"));
+        policy.setCreator(1);
+        policy.setTarget(new Corpus("WPD_3"));
+        policy.addPermission(Permissions.Permission.READ);
+        policy.addPermission(Permissions.Permission.WRITE);
+
+        PolicyHandlerIface dao = helper().getContext().getPolicyDbProvider();
+        dao.createPolicy(policy, helper().getUser());
+
+        List<SecurityPolicy>[] list = dao.getPolicies("WPD_3", helper()
+                .getUser(), Permissions.Permission.READ.toByte());
+
+        assertNotNull(list);
+        List<SecurityPolicy> policies = list[0];
+        assertNotNull(policies);
+        assertFalse(policies.isEmpty());
+        assertEquals(2, policies.size());
+        assertTrue(policies.get(0) instanceof SecurityPolicy.OwnerPolicy);
+        policy = policies.get(1);
+
+        Set<Permissions.Permission> check = new HashSet<>();
+        check.add(Permissions.Permission.READ);
+        check.add(Permissions.Permission.WRITE);
+        assertEquals(check, policy.getPermissions());
+    }
+
+
+    @Test
+    public void testConditionRemoval () throws KustvaktException {
+        helper().setupResource(new Corpus("WPD_1"));
+        SecurityPolicy policy = new SecurityPolicy();
+        policy.addNewCondition(new PolicyCondition("test_1"));
+        policy.addNewCondition(new PolicyCondition("test_2"));
+        policy.setCreator(1);
+        policy.setTarget(new Corpus("WPD_1"));
+        policy.addPermission(Permissions.Permission.READ);
+
+        PolicyHandlerIface dao = helper().getContext().getPolicyDbProvider();
+        dao.createPolicy(policy, helper().getUser());
+
+        Object[] list = dao.getPolicies("WPD_1", helper().getUser(),
+                Permissions.Permission.READ.toByte());
+        assertNotNull(list);
+        List<SecurityPolicy> policies = (List<SecurityPolicy>) list[0];
+        assertNotNull(policies);
+        assertFalse(policies.isEmpty());
+        policy = policies.get(1);
+
+        assertEquals(2, policy.getConditions().size());
+        policy.removeCondition(new PolicyCondition("test_1"));
+        assertEquals(1, policy.getRemoved().size());
+        assertTrue(policy.getAdded().isEmpty());
+
+        dao.updatePolicy(policy, helper().getUser());
+        policies = dao.getPolicies("WPD_1", helper().getUser(),
+                Permissions.Permission.READ.toByte())[0];
+        policy = policies.get(1);
+        assertEquals(1, policy.getConditions().size());
+    }
+
+
+    @Test
+    public void testPermissionConversion () {
+        SecurityPolicy policy = new SecurityPolicy();
+        policy.setPOSIX("3");
+        Set<Permissions.Permission> perms = new HashSet<>();
+        perms.add(Permissions.Permission.READ);
+        perms.add(Permissions.Permission.WRITE);
+        assertEquals(perms, policy.getPermissions());
+    }
+
+
+    @Override
+    public void initMethod () throws KustvaktException {
+        helper().runBootInterfaces();
+        helper().setupAccount();
+    }
+}
diff --git a/src/test/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManagerTest.java b/src/test/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManagerTest.java
index 2c0d83e..35d06af 100644
--- a/src/test/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManagerTest.java
+++ b/src/test/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManagerTest.java
@@ -96,9 +96,7 @@
                 .getAuthenticationManager();
 
         User user = new KorAPUser(10, "random");
-
-        Userdata data = manager.getUserData(user, UserDetails.class);
-        assertNotNull(data);
+        manager.getUserData(user, UserDetails.class);
     }
 
 
@@ -109,9 +107,7 @@
                 .getAuthenticationManager();
 
         User user = new KorAPUser(10, "random");
-
-        Userdata data = manager.getUserData(user, UserSettings.class);
-        assertNotNull(data);
+        manager.getUserData(user, UserSettings.class);
     }
 
 
diff --git a/src/test/java/de/ids_mannheim/korap/suites/LoaderTestSuite.java b/src/test/java/de/ids_mannheim/korap/suites/LoaderTestSuite.java
new file mode 100644
index 0000000..9f3a05e
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/suites/LoaderTestSuite.java
@@ -0,0 +1,15 @@
+package de.ids_mannheim.korap.suites;
+
+/**
+ * @author hanl
+ * @date 09/03/2016
+ */
+
+import de.ids_mannheim.korap.config.CollectionLoaderTest;
+import de.ids_mannheim.korap.config.PolicyLoaderTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({ PolicyLoaderTest.class, CollectionLoaderTest.class })
+public class LoaderTestSuite {}
diff --git a/src/test/java/de/ids_mannheim/korap/suites/SecurityEntityTestSuite.java b/src/test/java/de/ids_mannheim/korap/suites/SecurityEntityTestSuite.java
new file mode 100644
index 0000000..c3cceda
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/suites/SecurityEntityTestSuite.java
@@ -0,0 +1,17 @@
+package de.ids_mannheim.korap.suites;
+
+import de.ids_mannheim.korap.security.PermissionBufferTest;
+import de.ids_mannheim.korap.security.PolicyBuilderTest;
+import de.ids_mannheim.korap.security.SecurityPolicyTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * @author hanl
+ * @date 09/03/2016
+ */
+// test object serialization and I/O buffers
+@RunWith(Suite.class)
+@Suite.SuiteClasses({ PermissionBufferTest.class, PolicyBuilderTest.class,
+        SecurityPolicyTest.class })
+public class SecurityEntityTestSuite {}
diff --git a/src/test/java/de/ids_mannheim/korap/suites/SecurityTestSuite.java b/src/test/java/de/ids_mannheim/korap/suites/SecurityTestSuite.java
new file mode 100644
index 0000000..45116b5
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/suites/SecurityTestSuite.java
@@ -0,0 +1,12 @@
+package de.ids_mannheim.korap.suites;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * @author hanl
+ * @date 09/03/2016
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({})
+public class SecurityTestSuite {}
diff --git a/src/test/java/de/ids_mannheim/korap/suites/ServiceTestSuite.java b/src/test/java/de/ids_mannheim/korap/suites/ServiceTestSuite.java
new file mode 100644
index 0000000..e83e232
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/suites/ServiceTestSuite.java
@@ -0,0 +1,15 @@
+package de.ids_mannheim.korap.suites;
+
+/**
+ * @author hanl
+ * @date 09/03/2016
+ */
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({})
+public class ServiceTestSuite {
+
+}
diff --git a/src/test/java/de/ids_mannheim/korap/user/UserFactoryTest.java b/src/test/java/de/ids_mannheim/korap/user/UserFactoryTest.java
new file mode 100644
index 0000000..51d03cb
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/user/UserFactoryTest.java
@@ -0,0 +1,7 @@
+package de.ids_mannheim.korap.user;
+
+/**
+ * @author hanl
+ * @date 04/02/2016
+ */
+public class UserFactoryTest {}
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktCoreRestTest.java b/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktCoreRestTest.java
index ec25c17..72a4a01 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktCoreRestTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktCoreRestTest.java
@@ -72,7 +72,7 @@
     //    @Test
     public void testGetStatsThrowsNoException () {
         CollectionQueryProcessor pr = new CollectionQueryProcessor();
-        pr.process("corpusID=WPD & textClass=Sport");
+        pr.process("corpusSigle=WPD & textClass=Sport");
         Map map = new LinkedHashMap();
         map.put("collection", pr.getRequestMap());
         ClientResponse response = resource().path(getAPIVersion())
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/full/LightServiceTest.java b/src/test/java/de/ids_mannheim/korap/web/service/full/LightServiceTest.java
new file mode 100644
index 0000000..5a604e2
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/web/service/full/LightServiceTest.java
@@ -0,0 +1,184 @@
+package de.ids_mannheim.korap.web.service.full;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.sun.jersey.api.client.ClientResponse;
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.query.serialize.QuerySerializer;
+import de.ids_mannheim.korap.utils.JsonUtils;
+import de.ids_mannheim.korap.web.service.FastJerseyTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+
+/**
+ * Created by hanl on 29.04.16.
+ */
+public class LightServiceTest extends FastJerseyTest {
+
+    @BeforeClass
+    public static void configure () throws Exception {
+        FastJerseyTest.setPackages("de.ids_mannheim.korap.web.service.light");
+    }
+
+
+    @Override
+    public void initMethod () throws KustvaktException {}
+
+
+    @Test
+    public void testQueryTrace () {
+        ClientResponse response = resource().path(getAPIVersion())
+                .path("search").queryParam("q", "[orth=das]")
+                .queryParam("ql", "poliqarp").queryParam("context", "sentence")
+                .queryParam("count", "13")
+                .method("TRACE", ClientResponse.class);
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String query = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(query);
+        assertNotNull(node);
+        assertEquals("orth", node.at("/query/wrap/layer").asText());
+        assertEquals("opennlp", node.at("/query/wrap/foundry").asText());
+        assertEquals("sentence", node.at("/meta/context").asText());
+        assertEquals("13", node.at("/meta/count").asText());
+    }
+
+    @Test
+    public void testbuildAndPostQuery() {
+        ClientResponse response = resource()
+                .path(getAPIVersion())
+                .path("search")
+                .queryParam("q", "[orth=das]")
+                .queryParam("ql", "poliqarp")
+                .queryParam("cq", "corpusSigle=WPD | corpusSigle=GOE")
+                .method("TRACE", ClientResponse.class);
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+
+        String query = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(query);
+        assertNotNull(node);
+
+        response = resource()
+                .path(getAPIVersion())
+                .path("search").post(ClientResponse.class, query);
+
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String matches = response.getEntity(String.class);
+        JsonNode match_node = JsonUtils.readTree(matches);
+        assertNotEquals(0, match_node.path("matches").size());
+    }
+
+
+    @Test
+    public void testQueryGet () {
+        ClientResponse response = resource().path(getAPIVersion())
+                .path("search").queryParam("q", "[orth=das]")
+                .queryParam("ql", "poliqarp").queryParam("context", "sentence")
+                .queryParam("count", "13").get(ClientResponse.class);
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String query = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(query);
+        assertNotNull(node);
+        assertEquals("orth", node.at("/query/wrap/layer").asText());
+        assertEquals("base/s:s", node.at("/meta/context").asText());
+        assertEquals("13", node.at("/meta/count").asText());
+        assertNotEquals(0, node.at("/matches").size());
+    }
+
+
+    @Test
+    public void testFoundryRewrite () {
+        ClientResponse response = resource().path(getAPIVersion())
+                .path("search").queryParam("q", "[orth=das]")
+                .queryParam("ql", "poliqarp").queryParam("context", "sentence")
+                .queryParam("count", "13").get(ClientResponse.class);
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String query = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(query);
+        assertNotNull(node);
+        assertEquals("orth", node.at("/query/wrap/layer").asText());
+        assertEquals("opennlp", node.at("/query/wrap/foundry").asText());
+    }
+
+
+    @Test
+    public void testQueryPost () {
+        QuerySerializer s = new QuerySerializer();
+        s.setQuery("[orth=das]", "poliqarp");
+
+        ClientResponse response = resource().path(getAPIVersion())
+                .path("search").post(ClientResponse.class, s.toJSON());
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String query = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(query);
+        assertNotNull(node);
+        assertEquals("orth", node.at("/query/wrap/layer").asText());
+        assertNotEquals(0, node.at("/matches").size());
+    }
+
+
+    @Test
+    public void testParameterField () {
+        ClientResponse response = resource().path(getAPIVersion())
+                .path("search").queryParam("q", "[orth=das]")
+                .queryParam("ql", "poliqarp")
+                .queryParam("fields", "author, docSigle")
+                .queryParam("context", "sentence").queryParam("count", "13")
+                .get(ClientResponse.class);
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String query = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(query);
+        assertNotNull(node);
+        assertEquals("orth", node.at("/query/wrap/layer").asText());
+        assertNotEquals(0, node.at("/matches").size());
+        assertEquals("[\"author, docSigle\"]", node.at("/meta/fields")
+                .toString());
+    }
+
+
+    @Test
+    public void testCQParameter () {
+        ClientResponse response = resource().path(getAPIVersion())
+                .path("search").queryParam("q", "[orth=das]")
+                .queryParam("ql", "poliqarp")
+                .queryParam("fields", "author, docSigle")
+                .queryParam("context", "sentence").queryParam("count", "13")
+                .queryParam("cq", "textClass=Politik & corpus=WPD")
+                .method("TRACE", ClientResponse.class);
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String query = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(query);
+        assertNotNull(node);
+        assertEquals("orth", node.at("/query/wrap/layer").asText());
+        assertEquals("Politik", node.at("/collection/operands/0/value")
+                .asText());
+        assertEquals("WPD", node.at("/collection/operands/1/value").asText());
+
+        response = resource().path(getAPIVersion()).path("search")
+                .queryParam("q", "[orth=das]").queryParam("ql", "poliqarp")
+                .queryParam("fields", "author, docSigle")
+                .queryParam("context", "sentence").queryParam("count", "13")
+                .queryParam("cq", "textClass=Politik & corpus=WPD")
+                .get(ClientResponse.class);
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        query = response.getEntity(String.class);
+        node = JsonUtils.readTree(query);
+        assertNotNull(node);
+        assertEquals("orth", node.at("/query/wrap/layer").asText());
+        assertEquals("Politik", node.at("/collection/operands/0/value")
+                .asText());
+        assertEquals("WPD", node.at("/collection/operands/1/value").asText());
+    }
+
+}
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/full/ResourceServiceTest.java b/src/test/java/de/ids_mannheim/korap/web/service/full/ResourceServiceTest.java
index 6cb7700..d0a5b96 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/full/ResourceServiceTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/full/ResourceServiceTest.java
@@ -135,8 +135,10 @@
                 ClientResponse.Status.OK.getStatusCode());
         String ent = response.getEntity(String.class);
         JsonNode node = JsonUtils.readTree(ent);
-        System.out.println("PUBLIC COLLECTION");
-        System.out.println(node);
+        assertNotNull(node);
+        assertEquals("koral:docGroup", node.at("/collection/@type").asText());
+        assertEquals("operation:or", node.at("/collection/operation").asText());
+        assertNotEquals(0, node.at("/collection/operands").size());
     }
 
 
