Started adapting tests to new Collection API

Change-Id: I6dcf7ecbdc4404f65628e1038cf234ae32d1b070
diff --git a/src/test/resources/queries/metaquery8-filtered-further.jsonld b/src/test/resources/queries/metaquery8-filtered-further.jsonld
index 5a497cf..06d3766 100644
--- a/src/test/resources/queries/metaquery8-filtered-further.jsonld
+++ b/src/test/resources/queries/metaquery8-filtered-further.jsonld
@@ -18,6 +18,72 @@
 	    "right":["char",90]
 	}
     },
+  "collection" : {
+    "@type": "koral:docGroup",
+    "operation": "operation:and",
+    "operands": [
+      {
+	"@type": "koral:docGroup",
+	"operation": "operation:or",
+	"operands": [
+          {
+            "@type": "koral:doc",
+            "key": "ID",
+            "match": "match:eq",
+            "value": "WPD_AAA.00001",
+            "type": "type:string"
+          },
+          {
+            "@type": "koral:doc",
+            "key": "ID",
+            "match": "match:eq",
+            "value": "WPD_AAA.00002",
+            "type": "type:string"
+          }
+	]
+      },
+      {
+	"@type": "koral:docGroup",
+	"operation": "operation:or",
+	"operands": [
+          {
+            "@type": "koral:doc",
+            "key": "ID",
+            "match": "match:eq",
+            "value": "WPD_AAA.00003",
+            "type": "type:string"
+          },
+          {
+            "@type": "koral:doc",
+            "key": "ID",
+            "match": "match:eq",
+            "value": "WPD_AAA.00002",
+            "type": "type:string"
+          }
+	]
+      },
+      {
+	"@type": "koral:docGroup",
+	"operation": "operation:or",
+	"operands": [
+          {
+            "@type": "koral:doc",
+            "key": "ID",
+            "match": "match:eq",
+            "value": "WPD_AAA.00001",
+            "type": "type:string"
+          },
+          {
+            "@type": "koral:doc",
+            "key": "ID",
+            "match": "match:eq",
+            "value": "WPD_AAA.00005",
+            "type": "type:string"
+          }
+	]
+      }
+    ]
+  },
     "collections": [
 	{
 	    "@type": "koral:meta-filter",
diff --git a/src/test/resources/queries/metaquery8-filtered-nested.jsonld b/src/test/resources/queries/metaquery8-filtered-nested.jsonld
index 7c8cf43..fd14b53 100644
--- a/src/test/resources/queries/metaquery8-filtered-nested.jsonld
+++ b/src/test/resources/queries/metaquery8-filtered-nested.jsonld
@@ -1,73 +1,132 @@
 {
-    "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
-    "query": {
-	"@type": "koral:token", 
-	"wrap": {
-	    "@type": "koral:term", 
-	    "foundry": "mate",
-	    "layer" : "lemma",
-	    "key":"der", 
-	    "match": "match:eq"
-	}
-    },
-    "meta":{
-	"startPage":1,
-	"count": 10,
-	"context":{
-	    "left":["char",90],
-	    "right":["char",90]
-	}
-    },
-    "collections": [
-	{
-	    "@type": "koral:meta-filter",
-	    "@id": "korap-filter#id-1223232",
-	    "@value": {
-		"@type": "koral:group",
-		"relation": "or",
-		"@field": "koral:field#ID",
-		"operands": [
-		    {
-			"@type": "koral:term",
-			"@value": "WPD_AAA.00001"
-		    },
-		    {
-			"@type": "koral:term",
-			"@value": "WPD_AAA.00002"
-		    }
-		]
-	    }
-	},
-	{
-	    "@type": "koral:meta-filter",
-	    "@id": "korap-filter#id-1223232",
-	    "@value": {
-		"@type": "koral:group",
-		"relation": "or",
-		"@field": "koral:field#ID",
-		"operands": [
-		    {
-			"@type": "koral:term",
-			"@value": "WPD_AAA.00003"
-		    },
-		    {
-			"@type": "koral:group",
-			"relation": "and",
-			"@field": "koral:field#tokens",
-			"operands": [
-			    {
-				"@type": "koral:term",
-				"@value": "s:die"
-			    },
-			    {
-				"@type": "koral:term",
-				"@value": "s:Schriftzeichen"
-			    }
-
-			]
-		    }
-		]
-	    }
-	}
+  "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+  "query": {
+    "@type": "koral:token", 
+    "wrap": {
+      "@type": "koral:term", 
+      "foundry": "mate",
+      "layer" : "lemma",
+      "key":"der", 
+      "match": "match:eq"
+    }
+  },
+  "meta":{
+    "startPage":1,
+    "count": 10,
+    "context":{
+      "left":["char",90],
+      "right":["char",90]
+    }
+  },
+  "collection" : {
+    "@type": "koral:docGroup",
+    "operation": "operation:and",
+    "operands": [
+      {
+	"@type": "koral:docGroup",
+	"operation": "operation:or",
+	"operands": [
+          {
+            "@type": "koral:doc",
+            "key": "ID",
+            "match": "match:eq",
+            "value": "WPD_AAA.00001",
+            "type": "type:string"
+          },
+          {
+            "@type": "koral:doc",
+            "key": "ID",
+            "match": "match:eq",
+            "value": "WPD_AAA.00002",
+            "type": "type:string"
+          }
+	]
+      },
+      {
+	"@type": "koral:docGroup",
+	"operation": "operation:or",
+	"operands": [
+          {
+            "@type": "koral:doc",
+            "key": "ID",
+            "match": "match:eq",
+            "value": "WPD_AAA.00003",
+            "type": "type:string"
+          },
+	  {
+	    "@type": "koral:docGroup",
+	    "operation": "operation:and",
+	    "operands": [
+              {
+		"@type": "koral:doc",
+		"key": "tokens",
+		"match": "match:eq",
+		"value": "s:die",
+		"type": "type:string"
+              },
+              {
+		"@type": "koral:doc",
+		"key": "tokens",
+		"match": "match:eq",
+		"value": "s:Schriftzeichen",
+		"type": "type:string"
+              }
+	    ]
+	  }
+	]
+      }
     ]
+  },
+  "collections": [
+    {
+      "@type": "koral:meta-filter",
+      "@id": "korap-filter#id-1223232",
+      "@value": {
+	"@type": "koral:group",
+	"relation": "or",
+	"@field": "koral:field#ID",
+	"operands": [
+	  {
+	    "@type": "koral:term",
+	    "@value": "WPD_AAA.00001"
+	  },
+	  {
+	    "@type": "koral:term",
+	    "@value": "WPD_AAA.00002"
+	  }
+	]
+      }
+    },
+    {
+      "@type": "koral:meta-filter",
+      "@id": "korap-filter#id-1223232",
+      "@value": {
+	"@type": "koral:group",
+	"relation": "or",
+	"@field": "koral:field#ID",
+	"operands": [
+	  {
+	    "@type": "koral:term",
+	    "@value": "WPD_AAA.00003"
+	  },
+	  {
+	    "@type": "koral:group",
+	    "relation": "and",
+	    "@field": "koral:field#tokens",
+	    "operands": [
+	      {
+		"@type": "koral:term",
+		"@value": "s:die"
+	      },
+	      {
+		"@type": "koral:term",
+		"@value": "s:Schriftzeichen"
+	      }
+
+	    ]
+	  }
+	]
+      }
+    }
+  ]
 }
diff --git a/src/test/resources/queries/metaquery8-filtered.jsonld b/src/test/resources/queries/metaquery8-filtered.jsonld
index 9e7ee8a..1a3ed3c 100644
--- a/src/test/resources/queries/metaquery8-filtered.jsonld
+++ b/src/test/resources/queries/metaquery8-filtered.jsonld
@@ -1,61 +1,107 @@
 {
-    "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
-    "query": {
-	"@type": "koral:token", 
-	"wrap": {
-	    "@type": "koral:term", 
-	    "foundry": "mate",
-	    "layer" : "lemma",
-	    "key":"der", 
-	    "match": "match:eq"
-	}
-    },
-    "meta":{
-	"startPage":1,
-	"count": 10,
-	"context":{
-	    "left":["char",90],
-	    "right":["char",90]
-	}
-    },
-    "collections": [
-	{
-	    "@type": "koral:meta-filter",
-	    "@id": "korap-filter#id-1223232",
-	    "@value": {
-		"@type": "koral:group",
-		"relation": "or",
-		"@field": "koral:field#ID",
-		"operands": [
-		    {
-			"@type": "koral:term",
-			"@value": "WPD_AAA.00001"
-		    },
-		    {
-			"@type": "koral:term",
-			"@value": "WPD_AAA.00002"
-		    }
-		]
-	    }
-	},
-	{
-	    "@type": "koral:meta-filter",
-	    "@id": "korap-filter#id-1223232",
-	    "@value": {
-		"@type": "koral:group",
-		"relation": "or",
-		"@field": "koral:field#ID",
-		"operands": [
-		    {
-			"@type": "koral:term",
-			"@value": "WPD_AAA.00003"
-		    },
-		    {
-			"@type": "koral:term",
-			"@value": "WPD_AAA.00002"
-		    }
-		]
-	    }
-	}
+  "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+  "query": {
+    "@type": "koral:token", 
+    "wrap": {
+      "@type": "koral:term", 
+      "foundry": "mate",
+      "layer" : "lemma",
+      "key":"der", 
+      "match": "match:eq"
+    }
+  },
+  "meta":{
+    "startPage":1,
+    "count": 10,
+    "context":{
+      "left":["char",90],
+      "right":["char",90]
+    }
+  },
+  "collection" : {
+    "@type": "koral:docGroup",
+    "operation": "operation:and",
+    "operands": [
+      {
+	"@type": "koral:docGroup",
+	"operation": "operation:or",
+	"operands": [
+          {
+            "@type": "koral:doc",
+            "key": "ID",
+            "match": "match:eq",
+            "value": "WPD_AAA.00001",
+            "type": "type:string"
+          },
+          {
+            "@type": "koral:doc",
+            "key": "ID",
+            "match": "match:eq",
+            "value": "WPD_AAA.00002",
+            "type": "type:string"
+          }
+	]
+      },
+      {
+	"@type": "koral:docGroup",
+	"operation": "operation:or",
+	"operands": [
+          {
+            "@type": "koral:doc",
+            "key": "ID",
+            "match": "match:eq",
+            "value": "WPD_AAA.00003",
+            "type": "type:string"
+          },
+          {
+            "@type": "koral:doc",
+            "key": "ID",
+            "match": "match:eq",
+            "value": "WPD_AAA.00002",
+            "type": "type:string"
+          }
+	]
+      }
     ]
+  },
+  "collections": [
+    {
+      "@type": "koral:meta-filter",
+      "@id": "korap-filter#id-1223232",
+      "@value": {
+	"@type": "koral:group",
+	"relation": "or",
+	"@field": "koral:field#ID",
+	"operands": [
+	  {
+	    "@type": "koral:term",
+	    "@value": "WPD_AAA.00001"
+	  },
+	  {
+	    "@type": "koral:term",
+	    "@value": "WPD_AAA.00002"
+	  }
+	]
+      }
+    },
+    {
+      "@type": "koral:meta-filter",
+      "@id": "korap-filter#id-1223232",
+      "@value": {
+	"@type": "koral:group",
+	"relation": "or",
+	"@field": "koral:field#ID",
+	"operands": [
+	  {
+	    "@type": "koral:term",
+	    "@value": "WPD_AAA.00003"
+	  },
+	  {
+	    "@type": "koral:term",
+	    "@value": "WPD_AAA.00002"
+	  }
+	]
+      }
+    }
+  ]
 }
diff --git a/src/test/resources/queries/metaquery8.jsonld b/src/test/resources/queries/metaquery8.jsonld
index f2417f0..e3a2a57 100644
--- a/src/test/resources/queries/metaquery8.jsonld
+++ b/src/test/resources/queries/metaquery8.jsonld
@@ -1,42 +1,41 @@
 {
-    "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
-    "query": {
-	"@type": "koral:token", 
-	"wrap": {
-	    "@type": "koral:term", 
-	    "foundry": "mate",
-	    "layer" : "lemma",
-	    "key":"der", 
-	    "match": "match:eq"
-	}
-    },
-    "meta":{
-	"startPage":1,
-	"count": 10,
-	"context":{
-	    "left":["char",90],
-	    "right":["char",90]
-	}
-    },
-    "collections": [
-	{
-	    "@type": "koral:meta-filter",
-	    "@id": "korap-filter#id-1223232",
-	    "@value": {
-		"@type": "koral:group",
-		"relation": "or",
-		"@field": "koral:field#ID",
-		"operands": [
-		    {
-			"@type": "koral:term",
-			"@value": "WPD_AAA.00001"
-		    },
-		    {
-			"@type": "koral:term",
-			"@value": "WPD_AAA.00002"
-		    }
-		]
-	    }
-	}
+  "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+  "query": {
+    "@type": "koral:token", 
+    "wrap": {
+      "@type": "koral:term", 
+      "foundry": "mate",
+      "layer" : "lemma",
+      "key":"der", 
+      "match": "match:eq"
+    }
+  },
+  "meta":{
+    "startPage":1,
+    "count": 10,
+    "context":{
+      "left":["char",90],
+      "right":["char",90]
+    }
+  },
+  "collection" : {
+    "@type" : "koral:docGroup",
+    "operation": "operation:or",
+    "operands": [
+      {
+	"@type": "koral:doc",
+	"key": "ID",
+	"match": "match:eq",
+	"value": "WPD_AAA.00001",
+	"type": "type:string"
+      },
+      {
+	"@type": "koral:doc",
+	"key": "ID",
+	"match": "match:eq",
+	"value": "WPD_AAA.00002",
+	"type": "type:string"
+      }
     ]
+  }
 }