diff --git a/full/src/main/resources/ehcache.xml b/full/src/main/resources/ehcache.xml
index 2531fdb..cc06d48 100644
--- a/full/src/main/resources/ehcache.xml
+++ b/full/src/main/resources/ehcache.xml
@@ -1,7 +1,6 @@
 <ehcache xsi:noNamespaceSchemaLocation="http://www.ehcache.org/ehcache.xsd"
 	updateCheck="true" monitoring="autodetect" dynamicConfig="true">
 	
-	<sizeOfPolicy maxDepth="100" maxDepthExceededBehavior="abort" />
     <defaultCache eternal='true' overflowToDisk='false'/>
     <!--maxBytesLocalHeap="200M"-->
     <diskStore path="./cache_store"/>
@@ -60,5 +59,6 @@
 		maxBytesLocalDisk="1G"
 		diskExpiryThreadIntervalSeconds = "120" > 
 		<persistence strategy="localTempSwap"/>
+		<sizeOfPolicy maxDepth="1000" maxDepthExceededBehavior="abort" />
 	</cache>        
 </ehcache>
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/StatisticsControllerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/StatisticsControllerTest.java
index b0d16cf..8befd15 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/StatisticsControllerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/StatisticsControllerTest.java
@@ -5,11 +5,12 @@
 
 import java.io.IOException;
 
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+
 import org.junit.Test;
 
-import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
 import com.sun.jersey.api.client.ClientResponse;
 
 import de.ids_mannheim.korap.config.SpringJerseyTest;
@@ -23,12 +24,9 @@
  */
 public class StatisticsControllerTest extends SpringJerseyTest {
 
-    private ObjectMapper mapper = new ObjectMapper();
-
-
     @Test
     public void testGetStatisticsNoResource ()
-            throws JsonProcessingException, IOException {
+            throws IOException, KustvaktException {
         String corpusQuery = "corpusSigle=WPD15";
         ClientResponse response = resource().path(API_VERSION)
                 .path("statistics")
@@ -38,7 +36,7 @@
         assert ClientResponse.Status.OK.getStatusCode() == response.getStatus();
 
         String ent = response.getEntity(String.class);
-        JsonNode node = mapper.readTree(ent);
+        JsonNode node = JsonUtils.readTree(ent);
         assertEquals(node.get("documents").asInt(),0);
         assertEquals(node.get("tokens").asInt(),0);
     }
@@ -82,7 +80,7 @@
 
     @Test
     public void testGetStatisticsWithcorpusQuery1 ()
-            throws JsonProcessingException, IOException {
+            throws IOException, KustvaktException {
         String corpusQuery = "corpusSigle=GOE";
         ClientResponse response = resource().path(API_VERSION)
                 .path("statistics")
@@ -92,7 +90,7 @@
         assert ClientResponse.Status.OK.getStatusCode() == response.getStatus();
 
         String ent = response.getEntity(String.class);
-        JsonNode node = mapper.readTree(ent);
+        JsonNode node = JsonUtils.readTree(ent);
         assertEquals(node.get("documents").asInt(),11);
         assertEquals(node.get("tokens").asInt(),665842);
         
@@ -105,13 +103,13 @@
 
     @Test
     public void testGetStatisticsWithcorpusQuery2 ()
-            throws JsonProcessingException, IOException {
+            throws IOException, KustvaktException {
         ClientResponse response = resource().path(API_VERSION)
                 .path("statistics")
                 .queryParam("corpusQuery", "creationDate since 1810")
                 .get(ClientResponse.class);
         String ent = response.getEntity(String.class);
-        JsonNode node = mapper.readTree(ent);
+        JsonNode node = JsonUtils.readTree(ent);
         assert ClientResponse.Status.OK.getStatusCode() == response.getStatus();
         assertEquals(node.get("documents").asInt(),7);
         assertEquals(node.get("tokens").asInt(),279402);
@@ -122,7 +120,7 @@
 
     @Test
     public void testGetStatisticsWithWrongcorpusQuery ()
-            throws JsonProcessingException, IOException {
+            throws IOException, KustvaktException {
         ClientResponse response = resource().path(API_VERSION)
                 .path("statistics")
                 .queryParam("corpusQuery", "creationDate geq 1810")
@@ -131,7 +129,7 @@
         assert ClientResponse.Status.BAD_REQUEST.getStatusCode() == response
                 .getStatus();
         String ent = response.getEntity(String.class);
-        JsonNode node = mapper.readTree(ent);
+        JsonNode node = JsonUtils.readTree(ent);
         assertEquals(node.at("/errors/0/0").asInt(), 302);
         assertEquals(node.at("/errors/0/1").asText(),
                 "Could not parse query >>> (creationDate geq 1810) <<<.");
@@ -142,7 +140,7 @@
 
     @Test
     public void testGetStatisticsWithWrongcorpusQuery2 ()
-            throws JsonProcessingException, IOException {
+            throws IOException, KustvaktException {
         ClientResponse response = resource().path(API_VERSION)
                 .path("statistics")
                 .queryParam("corpusQuery", "creationDate >= 1810")
@@ -152,7 +150,7 @@
         assertEquals(ClientResponse.Status.BAD_REQUEST.getStatusCode(),
                 response.getStatus());
         
-        JsonNode node = mapper.readTree(ent);
+        JsonNode node = JsonUtils.readTree(ent);
         assertEquals(node.at("/errors/0/0").asInt(), 305);
         assertEquals(node.at("/errors/0/1").asText(),
                 "Operator >= is not acceptable.");
@@ -162,7 +160,7 @@
     
     @Test
     public void testGetStatisticsWithoutcorpusQuery ()
-            throws JsonProcessingException, IOException {
+            throws IOException, KustvaktException {
         ClientResponse response = resource().path(API_VERSION)
                 .path("statistics")
                 .get(ClientResponse.class);
@@ -171,11 +169,86 @@
 					 response.getStatus());
         String ent = response.getEntity(String.class);
 
-		JsonNode node = mapper.readTree(ent);
+		JsonNode node = JsonUtils.readTree(ent);
 		assertEquals(11, node.at("/documents").asInt());
         assertEquals(665842, node.at("/tokens").asInt());
         assertEquals(25074, node.at("/sentences").asInt());
         assertEquals(772, node.at("/paragraphs").asInt());
     }
    
+    @Test
+    public void testGetStatisticsWithKoralQuery ()
+            throws IOException, KustvaktException {
+        ClientResponse response = resource().path(API_VERSION)
+                .path("statistics")
+                .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                .post(ClientResponse.class,"{ \"collection\" : {\"@type\": "
+                        + "\"koral:doc\", \"key\": \"availability\", \"match\": "
+                        + "\"match:eq\", \"type\": \"type:regex\", \"value\": "
+                        + "\"CC-BY.*\"} }");
+
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                     response.getStatus());
+        String ent = response.getEntity(String.class);
+        
+        JsonNode node = JsonUtils.readTree(ent);
+        assertEquals(2, node.at("/documents").asInt());
+        assertEquals(72770, node.at("/tokens").asInt());
+        assertEquals(2985, node.at("/sentences").asInt());
+        assertEquals(128, node.at("/paragraphs").asInt());
+    }
+    
+    @Test
+    public void testGetStatisticsWithEmptyCollection ()
+            throws IOException, KustvaktException {
+        ClientResponse response = resource().path(API_VERSION)
+                .path("statistics")
+                .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                .post(ClientResponse.class,"{}");
+
+        assertEquals(ClientResponse.Status.BAD_REQUEST.getStatusCode(),
+                     response.getStatus());
+        String ent = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(ent);
+        assertEquals(node.at("/errors/0/0").asInt(),
+                de.ids_mannheim.korap.util.StatusCodes.MISSING_COLLECTION);
+        assertEquals(node.at("/errors/0/1").asText(),
+                "Collection is not found");
+    }
+    
+    @Test
+    public void testGetStatisticsWithIncorrectJson ()
+            throws IOException, KustvaktException {
+        ClientResponse response = resource().path(API_VERSION)
+                .path("statistics")
+                .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                .post(ClientResponse.class,"{ \"collection\" : }");
+
+        assertEquals(ClientResponse.Status.BAD_REQUEST.getStatusCode(),
+                     response.getStatus());
+        String ent = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(ent);
+        assertEquals(node.at("/errors/0/0").asInt(),
+                de.ids_mannheim.korap.util.StatusCodes.UNABLE_TO_PARSE_JSON);
+        assertEquals(node.at("/errors/0/1").asText(),
+                "Unable to parse JSON");
+    }
+    
+    @Test
+    public void testGetStatisticsWithoutKoralQuery ()
+            throws IOException, KustvaktException {
+        ClientResponse response = resource().path(API_VERSION)
+                .path("statistics").post(ClientResponse.class);
+
+        assertEquals(ClientResponse.Status.BAD_REQUEST.getStatusCode(),
+                response.getStatus());
+        String ent = response.getEntity(String.class);
+
+        JsonNode node = JsonUtils.readTree(ent);
+        assertEquals(StatusCodes.NO_QUERY, node.at("/errors/0/0").asInt());
+        assertEquals("Koral query is missing",
+                node.at("/errors/0/1").asText());
+        assertEquals("koralQuery", node.at("/errors/0/2").asText());
+    }
+    
 }
