diff --git a/src/test/java/MetaQuerySerializationTest.java b/src/test/java/MetaQuerySerializationTest.java
index f8dc4e6..7bf8784 100644
--- a/src/test/java/MetaQuerySerializationTest.java
+++ b/src/test/java/MetaQuerySerializationTest.java
@@ -1,9 +1,8 @@
 import com.fasterxml.jackson.core.JsonGenerationException;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JsonMappingException;
-import de.ids_mannheim.korap.query.serialize.CollectionQuery;
+import de.ids_mannheim.korap.query.serialize.CollectionQueryBuilder;
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
-import de.ids_mannheim.korap.resource.Relation;
 import de.ids_mannheim.korap.util.QueryException;
 import org.junit.Assert;
 import org.junit.Test;
@@ -30,7 +29,7 @@
         b.append(" AND ");
         b.append("textClass:wissenschaft");
 //        CollectionQuery qu = new CollectionQuery().addMetaFilterQuery(b.toString());
-        CollectionQuery query = new CollectionQuery().addMetaFilterQuery(b.toString());
+        CollectionQueryBuilder query = new CollectionQueryBuilder().addMetaFilterQuery(b.toString());
         System.out.println(query.buildString());
         System.out.println(query.toCollections());
 //        System.out.println("value reference " + qu.stringify());
@@ -39,7 +38,7 @@
 
     @Test
     public void testSingle() throws IOException {
-        CollectionQuery query = new CollectionQuery().addMetaFilter("textClass", "wissenschaft");
+        CollectionQueryBuilder query = new CollectionQueryBuilder().addMetaFilter("textClass", "wissenschaft");
 //        System.out.println("------ TEXT SINGLE " + query.stringify());
         System.out.println(query.buildString());
     }
@@ -52,7 +51,7 @@
         b.append("pubDate:<2012-04-01");
         b.append(" AND ");
         b.append("author:Goethe");
-        CollectionQuery query = new CollectionQuery().addMetaFilterQuery(b.toString());
+        CollectionQueryBuilder query = new CollectionQueryBuilder().addMetaFilterQuery(b.toString());
         System.out.println("value until/since : " + query.buildString());
         System.out.println("meta value until/since " + query.toCollections());
         Assert.assertEquals("[{\"@type\":\"korap:meta-filter\",\"@value\":{\"@type\":\"korap:group\",\"relation\":\"and\",\"operands\":[{\"@type\":\"korap:term\",\"@field\":\"korap:field#author\",\"@value\":\"Goethe\"},{\"@type\":\"korap:group\",\"@field\":\"korap:field#pubDate\",\"relation\":\"between\",\"operands\":[{\"@type\":\"korap:date\",\"@value\":\"2012-04-01\"},{\"@type\":\"korap:date\",\"@value\":\"2013-04-01\"}]}]}}]", query.buildString());
@@ -65,7 +64,7 @@
         b.append("pubDate:>2013-12-10");
         b.append(" AND ");
         b.append("author:Hesse");
-        CollectionQuery query = new CollectionQuery().addMetaFilterQuery(b.toString());
+        CollectionQueryBuilder query = new CollectionQueryBuilder().addMetaFilterQuery(b.toString());
         System.out.println("Running date check (until) with additional attribute author");
         Assert.assertEquals("[{\"@type\":\"korap:meta-filter\",\"@value\":{\"@type\":\"korap:group\",\"relation\":\"and\",\"operands\":[{\"@type\":\"korap:term\",\"@field\":\"korap:field#author\",\"@value\":\"Hesse\"},{\"@type\":\"korap:group\",\"@field\":\"korap:field#pubDate\",\"relation\":\"until\",\"operands\":[{\"@type\":\"korap:date\",\"@value\":\"2013-12-10\"}]}]}}]", query.buildString());
 //        System.out.println("value until : " + query.stringify());
@@ -78,7 +77,7 @@
         b.append("pubDate:<2013-12-10");
         b.append(" AND ");
         b.append("author:Kafka");
-        CollectionQuery query = new CollectionQuery().addMetaFilterQuery(b.toString());
+        CollectionQueryBuilder query = new CollectionQueryBuilder().addMetaFilterQuery(b.toString());
         System.out.println("value since : " + query.buildString());
         System.out.println("meta value since " + query.toCollections());
 //        System.out.println();
@@ -126,7 +125,7 @@
         b.append("pubDate:<2013-12-10");
         b.append(" AND ");
         b.append("author:Kafka");
-        CollectionQuery q = new CollectionQuery().addMetaFilterQuery(b.toString());
+        CollectionQueryBuilder q = new CollectionQueryBuilder().addMetaFilterQuery(b.toString());
         q.addMetaExtend("author", "Hesse");
 
         System.out.println("--- ALL " + q.buildString());
@@ -140,14 +139,14 @@
         b.append("pubDate:<2013-12-10");
         b.append(" AND ");
         b.append("author:Kafka");
-        CollectionQuery q = new CollectionQuery().addMetaExtendQuery(b.toString());
+        CollectionQueryBuilder q = new CollectionQueryBuilder().addMetaExtendQuery(b.toString());
         System.out.println("array repres " + q.buildString());
         System.out.println();
     }
 
     @Test
     public void testCollections() throws IOException {
-        CollectionQuery q = new CollectionQuery().addMetaFilter("corpusID", "A00");
+        CollectionQueryBuilder q = new CollectionQueryBuilder().addMetaFilter("corpusID", "A00");
         q.addMetaExtend("corpusID", "A01");
 
         System.out.println("results stringified " + q.buildString());
@@ -164,14 +163,14 @@
     @Test
     public void testResources() throws IOException {
         String meta = "[{\"@type\":\"korap:meta-filter\",\"@value\":{\"@type\":\"korap:term\",\"@field\":\"korap:field#corpusID\",\"@value\":\"WPD\"}}]";
-        CollectionQuery q = new CollectionQuery().addResource(meta);
+        CollectionQueryBuilder q = new CollectionQueryBuilder().addResource(meta);
         System.out.println("Testing Resource Meta data");
         org.junit.Assert.assertEquals("{\"collections\":" + meta + "}", q.toCollections());
     }
 
     @Test
     public void testA00() throws IOException {
-        CollectionQuery q = new CollectionQuery().addMetaExtend("corpusID", "A00").addMetaExtend("corpusID", "A01");
+        CollectionQueryBuilder q = new CollectionQueryBuilder().addMetaExtend("corpusID", "A00").addMetaExtend("corpusID", "A01");
         System.out.println("A meta: " + q.buildString());
         System.out.println();
     }
@@ -179,7 +178,7 @@
     @Test
     public void testResources2() throws IOException {
         String meta = "[{\"@type\":\"korap:meta-filter\",\"@value\":{\"@type\":\"korap:term\",\"@field\":\"korap:field#corpusID\",\"@value\":\"WPD\"}}]";
-        CollectionQuery q = new CollectionQuery().addResource(meta);
+        CollectionQueryBuilder q = new CollectionQueryBuilder().addResource(meta);
         q.addMetaFilter("textClass", "wissenschaft");
         System.out.println("stringified meta " + q.buildString());
         System.out.println("meta string " + q.toCollections());
