diff --git a/src/test/java/MetaQuerySerializationTest.java b/src/test/java/MetaQuerySerializationTest.java
index 2f7d8c3..1995510 100644
--- a/src/test/java/MetaQuerySerializationTest.java
+++ b/src/test/java/MetaQuerySerializationTest.java
@@ -3,6 +3,7 @@
 import com.fasterxml.jackson.databind.JsonMappingException;
 import de.ids_mannheim.korap.query.serialize.CollectionQuery;
 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,9 +31,9 @@
         b.append("textClass:wissenschaft");
 //        CollectionQuery qu = new CollectionQuery().addMetaFilter(b.toString());
         CollectionQuery query = new CollectionQuery().addMetaFilter(b.toString(),
-                CollectionQuery.RELATION.AND);
-        System.out.println(query.buildString(CollectionQuery.RELATION.AND, CollectionQuery.RELATION.AND));
-        System.out.println(query.toCollections(CollectionQuery.RELATION.AND, CollectionQuery.RELATION.AND));
+                Relation.AND);
+        System.out.println(query.buildString(Relation.AND, Relation.AND));
+        System.out.println(query.toCollections(Relation.AND, Relation.AND));
 //        System.out.println("value reference " + qu.stringify());
 //        System.out.println();
     }
@@ -41,7 +42,7 @@
     public void testSingle() throws IOException {
         CollectionQuery query = new CollectionQuery().addMetaFilter("textClass", "wissenschaft");
 //        System.out.println("------ TEXT SINGLE " + query.stringify());
-        System.out.println(query.buildString(CollectionQuery.RELATION.AND, CollectionQuery.RELATION.AND));
+        System.out.println(query.buildString(Relation.AND, Relation.AND));
     }
 
     @Test
@@ -52,10 +53,10 @@
         b.append("pubDate:<2012-04-01");
         b.append(" AND ");
         b.append("author:Goethe");
-        CollectionQuery query = new CollectionQuery().addMetaFilter(b.toString(), CollectionQuery.RELATION.AND);
-        System.out.println("value until/since : " + query.buildString(CollectionQuery.RELATION.AND, CollectionQuery.RELATION.AND));
-        System.out.println("meta value until/since " + query.toCollections(CollectionQuery.RELATION.AND, CollectionQuery.RELATION.AND));
-        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(CollectionQuery.RELATION.AND, CollectionQuery.RELATION.AND));
+        CollectionQuery query = new CollectionQuery().addMetaFilter(b.toString(), Relation.AND);
+        System.out.println("value until/since : " + query.buildString(Relation.AND, Relation.AND));
+        System.out.println("meta value until/since " + query.toCollections(Relation.AND, Relation.AND));
+        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(Relation.AND, Relation.AND));
 //        System.out.println();
     }
 
@@ -65,9 +66,9 @@
         b.append("pubDate:>2013-12-10");
         b.append(" AND ");
         b.append("author:Hesse");
-        CollectionQuery query = new CollectionQuery().addMetaFilter(b.toString(), CollectionQuery.RELATION.AND);
+        CollectionQuery query = new CollectionQuery().addMetaFilter(b.toString(), Relation.AND);
         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(CollectionQuery.RELATION.AND, CollectionQuery.RELATION.AND));
+        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(Relation.AND, Relation.AND));
 //        System.out.println("value until : " + query.stringify());
 //        System.out.println();
     }
@@ -78,13 +79,13 @@
         b.append("pubDate:<2013-12-10");
         b.append(" AND ");
         b.append("author:Kafka");
-        CollectionQuery query = new CollectionQuery().addMetaFilter(b.toString(), CollectionQuery.RELATION.AND);
-        System.out.println("value since : " + query.buildString(CollectionQuery.RELATION.AND,
-                CollectionQuery.RELATION.AND));
-        System.out.println("meta value since " + query.toCollections(CollectionQuery.RELATION.AND, CollectionQuery.RELATION.AND));
+        CollectionQuery query = new CollectionQuery().addMetaFilter(b.toString(), Relation.AND);
+        System.out.println("value since : " + query.buildString(Relation.AND,
+                Relation.AND));
+        System.out.println("meta value since " + query.toCollections(Relation.AND, Relation.AND));
 //        System.out.println();
         System.out.println("Running date check (since) 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\":\"Kafka\"},{\"@type\":\"korap:group\",\"@field\":\"korap:field#pubDate\",\"relation\":\"since\",\"operands\":[{\"@type\":\"korap:date\",\"@value\":\"2013-12-10\"}]}]}}]", query.buildString(CollectionQuery.RELATION.AND, CollectionQuery.RELATION.AND));
+        Assert.assertEquals("[{\"@type\":\"korap:meta-filter\",\"@value\":{\"@type\":\"korap:group\",\"relation\":\"and\",\"operands\":[{\"@type\":\"korap:term\",\"@field\":\"korap:field#author\",\"@value\":\"Kafka\"},{\"@type\":\"korap:group\",\"@field\":\"korap:field#pubDate\",\"relation\":\"since\",\"operands\":[{\"@type\":\"korap:date\",\"@value\":\"2013-12-10\"}]}]}}]", query.buildString(Relation.AND, Relation.AND));
     }
 
     @Test
@@ -127,10 +128,10 @@
         b.append("pubDate:<2013-12-10");
         b.append(" AND ");
         b.append("author:Kafka");
-        CollectionQuery q = new CollectionQuery().addMetaFilter(b.toString(), CollectionQuery.RELATION.AND);
+        CollectionQuery q = new CollectionQuery().addMetaFilter(b.toString(), Relation.AND);
         q.addMetaExtend("author", "Hesse");
 
-        System.out.println("--- ALL " + q.buildString(CollectionQuery.RELATION.AND, CollectionQuery.RELATION.AND));
+        System.out.println("--- ALL " + q.buildString(Relation.AND, Relation.AND));
         System.out.println();
 
     }
@@ -141,8 +142,8 @@
         b.append("pubDate:<2013-12-10");
         b.append(" AND ");
         b.append("author:Kafka");
-        CollectionQuery q = new CollectionQuery().addMetaExtend(b.toString(), CollectionQuery.RELATION.AND);
-        System.out.println("array repres " + q.buildString(CollectionQuery.RELATION.AND, CollectionQuery.RELATION.AND));
+        CollectionQuery q = new CollectionQuery().addMetaExtend(b.toString(), Relation.AND);
+        System.out.println("array repres " + q.buildString(Relation.AND, Relation.AND));
         System.out.println();
     }
 
@@ -151,8 +152,8 @@
         CollectionQuery q = new CollectionQuery().addMetaFilter("corpusID", "A00");
         q.addMetaExtend("corpusID", "A01");
 
-        System.out.println("results stringified " + q.buildString(CollectionQuery.RELATION.AND, CollectionQuery.RELATION.AND));
-        System.out.println("results to meta" + q.toCollections(CollectionQuery.RELATION.AND, CollectionQuery.RELATION.AND));
+        System.out.println("results stringified " + q.buildString(Relation.AND, Relation.AND));
+        System.out.println("results to meta" + q.toCollections(Relation.AND, Relation.AND));
         System.out.println();
     }
 
@@ -167,13 +168,13 @@
         String meta = "[{\"@type\":\"korap:meta-filter\",\"@value\":{\"@type\":\"korap:term\",\"@field\":\"korap:field#corpusID\",\"@value\":\"WPD\"}}]";
         CollectionQuery q = new CollectionQuery().addResource(meta);
         System.out.println("Testing Resource Meta data");
-        org.junit.Assert.assertEquals("{\"collections\":" + meta + "}", q.toCollections(CollectionQuery.RELATION.AND, CollectionQuery.RELATION.AND));
+        org.junit.Assert.assertEquals("{\"collections\":" + meta + "}", q.toCollections(Relation.AND, Relation.AND));
     }
 
     @Test
     public void testA00() throws IOException {
         CollectionQuery q = new CollectionQuery().addMetaExtend("corpusID", "A00").addMetaExtend("corpusID", "A01");
-        System.out.println("A meta: " + q.buildString(CollectionQuery.RELATION.AND, CollectionQuery.RELATION.AND));
+        System.out.println("A meta: " + q.buildString(Relation.AND, Relation.AND));
         System.out.println();
     }
 
@@ -182,8 +183,8 @@
         String meta = "[{\"@type\":\"korap:meta-filter\",\"@value\":{\"@type\":\"korap:term\",\"@field\":\"korap:field#corpusID\",\"@value\":\"WPD\"}}]";
         CollectionQuery q = new CollectionQuery().addResource(meta);
         q.addMetaFilter("textClass", "wissenschaft");
-        System.out.println("stringified meta " + q.buildString(CollectionQuery.RELATION.AND, CollectionQuery.RELATION.AND));
-        System.out.println("meta string " + q.toCollections(CollectionQuery.RELATION.AND, CollectionQuery.RELATION.AND));
+        System.out.println("stringified meta " + q.buildString(Relation.AND, Relation.AND));
+        System.out.println("meta string " + q.toCollections(Relation.AND, Relation.AND));
     }
 
 }
