diff --git a/src/test/java/de/ids_mannheim/korap/web/service/SearchKrillTest.java b/src/test/java/de/ids_mannheim/korap/web/service/SearchKrillTest.java
new file mode 100644
index 0000000..ff3679d
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/web/service/SearchKrillTest.java
@@ -0,0 +1,73 @@
+package de.ids_mannheim.korap.web.service;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import de.ids_mannheim.korap.KrillIndex;
+import de.ids_mannheim.korap.config.BeanConfigTest;
+import de.ids_mannheim.korap.config.KustvaktConfiguration;
+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.SearchKrill;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+
+/**
+ * Created by hanl on 02.06.16.
+ */
+public class SearchKrillTest extends BeanConfigTest {
+
+
+    @Override
+    public void initMethod () throws KustvaktException {
+
+    }
+
+
+    @Test
+    public void testInit () {
+        KustvaktConfiguration config = helper().getContext().getConfiguration();
+        System.out.println("'" + config.getIndexDir() + "'");
+        SearchKrill krill = new SearchKrill(config.getIndexDir());
+        assertNotNull(krill);
+    }
+
+
+    @Test
+    public void testIndex () {
+        KustvaktConfiguration config = helper().getContext().getConfiguration();
+        SearchKrill krill = new SearchKrill(config.getIndexDir());
+        assertNotNull(krill);
+
+        KrillIndex index = krill.getIndex();
+        assertNotNull(index);
+    }
+
+
+    @Test
+    public void testDocSize () {
+        KustvaktConfiguration config = helper().getContext().getConfiguration();
+        SearchKrill krill = new SearchKrill(config.getIndexDir());
+        assertNotNull(krill);
+        assertNotEquals(0, krill.getIndex().numberOf("documents"));
+    }
+
+
+    @Test
+    public void testSearch () {
+        QuerySerializer s = new QuerySerializer();
+        s.setQuery("[orth=das]", "poliqarp");
+
+
+        KustvaktConfiguration config = helper().getContext().getConfiguration();
+        SearchKrill krill = new SearchKrill(config.getIndexDir());
+        String result = krill.search(s.toJSON());
+
+        JsonNode node = JsonUtils.readTree(result);
+        assertNotNull(node);
+        assertNotEquals(0, node.at("/matches").size());
+
+    }
+
+}
