diff --git a/Changes b/Changes
index 313a31a..6e363e0 100644
--- a/Changes
+++ b/Changes
@@ -9,6 +9,7 @@
       from JSON responses (diewald)
     - [bugfix] Do not optimize %+w1:1 to be a treated like /+w1:1
       (diewald)
+    - [cleanup] Added a CQL AND query test (margaretha)  
 
 0.58.5 2019-03-18
     - [bugfix] Fix bug where duplicate keys occured in
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
index ae9d26f..0e07964 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
@@ -36,7 +36,6 @@
     Result kr;
     KrillIndex ki;
 
-
     private FieldDocument createFieldDoc0 () {
         FieldDocument fd = new FieldDocument();
         fd.addString("ID", "doc-0");
@@ -51,7 +50,6 @@
         return fd;
     }
 
-
     private FieldDocument createFieldDoc1 () {
         FieldDocument fd = new FieldDocument();
         fd.addString("ID", "doc-1");
@@ -65,7 +63,6 @@
         return fd;
     }
 
-
     private FieldDocument createFieldDoc2 () {
         FieldDocument fd = new FieldDocument();
         fd.addString("ID", "doc-2");
@@ -79,7 +76,6 @@
         return fd;
     }
 
-
     private FieldDocument createFieldDoc3 () {
         FieldDocument fd = new FieldDocument();
         fd.addString("ID", "doc-3");
@@ -92,7 +88,7 @@
                         + "[(5-6)s:d|_6$<i>5<i>6]");
         return fd;
     }
-    
+
     private FieldDocument createFieldDoc4 () {
         FieldDocument fd = new FieldDocument();
         fd.addString("ID", "doc-4");
@@ -106,7 +102,6 @@
         return fd;
     }
 
-
     public SpanQuery createQuery (String elementType, String x, String y,
             int min, int max, boolean isOrdered) {
 
@@ -116,7 +111,6 @@
                 new DistanceConstraint(e, min, max, isOrdered, false), true);
     }
 
-
     /**
      * Multiple documents
      * Ensure terms and elements are in the same doc
@@ -149,7 +143,7 @@
 
     /**
      * Ignore nested element distance unit
-     * */
+     */
     @Test
     public void testCase1b () throws IOException {
         ki = new KrillIndex();
@@ -168,7 +162,6 @@
         assertEquals(4, kr.getMatch(1).endPos);
     }
 
-    
     /**
      * Ensure terms and elements are in the same doc
      */
@@ -191,7 +184,6 @@
 
     }
 
-
     /** Skip to */
     @Test
     public void testCase3 () throws IOException {
@@ -216,7 +208,6 @@
 
     }
 
-
     /** Same tokens in different elements */
     @Test
     public void testCase4 () throws IOException {
@@ -236,7 +227,6 @@
 
     }
 
-
     /** Test query from json */
     @Test
     public void testCase5 () throws Exception {
@@ -244,7 +234,8 @@
         ki.addDoc(getClass().getResourceAsStream("/wiki/00001.json.gz"), true);
         ki.commit();
 
-        String jsonPath = getClass().getResource("/queries/cosmas1.json").getFile();
+        String jsonPath =
+                getClass().getResource("/queries/cosmas1.json").getFile();
         SpanQueryWrapper sqwi = getJsonQuery(jsonPath);
         kr = ki.search(sqwi.toQuery(), (short) 10);
 
@@ -255,6 +246,24 @@
         assertEquals(33, kr.getMatch(1).endPos);
     }
 
+    @Test
+    public void testCQLAnd () throws Exception {
+        ki = new KrillIndex();
+        ki.addDoc(getClass().getResourceAsStream("/wiki/00001.json.gz"), true);
+        ki.commit();
+
+        String jsonPath = getClass()
+                .getResource("/queries/distances/cql-and.jsonld").getFile();
+        SpanQueryWrapper sqwi = getJsonQuery(jsonPath);
+        SpanQuery query = sqwi.toQuery();
+        assertEquals(
+                "spanElementDistance(tokens:s:Buchstaben, tokens:s:Alphabet, "
+                        + "[(base/s:s[0:0], notOrdered, notExcluded)])",
+                query.toString());
+        kr = ki.search(sqwi.toQuery(), (short) 10);
+
+        assertEquals((long) 1, kr.getTotalResults());
+    }
 
     /** Test query from json (2) */
     @Test
@@ -281,7 +290,9 @@
                 sqwi.toQuery().toString());
 
         kr = ki.search(sqwi.toQuery(), (short) 10);
-        assertEquals(1, kr.getTotalResults()); // Is 1 correct or should it not be ordered?
+        assertEquals(1, kr.getTotalResults()); // Is 1 correct or
+                                               // should it not be
+                                               // ordered?
         assertEquals("[[ec]]ebdc", kr.getMatch(0).getSnippetBrackets());
     }
 }
diff --git a/src/test/resources/queries/distances/cql-and.jsonld b/src/test/resources/queries/distances/cql-and.jsonld
new file mode 100644
index 0000000..517a62a
--- /dev/null
+++ b/src/test/resources/queries/distances/cql-and.jsonld
@@ -0,0 +1,51 @@
+{
+    "@context": "http://korap.ids-mannheim.de/ns/KoralQuery/v0.3/context.jsonld",
+    "query": {
+        "@type": "koral:group",
+        "distances": [{
+            "@type": "cosmas:distance",
+            "key": "s",
+	    "boundary": {
+		"@type": "koral:boundary",
+		"max": "0",
+		"min": "0"
+	    }
+        }],
+        "inOrder": false,
+        "operands": [
+            {
+                "@type": "koral:token",
+                "wrap": {
+                    "@type": "koral:term",
+                    "foundry": "opennlp",
+                    "key": "Buchstaben",
+                    "layer": "orth",
+                    "match": "match:eq",
+                    "rewrites": [{
+                        "@type": "koral:rewrite",
+                        "operation": "operation:injection",
+                        "scope": "foundry",
+                        "src": "Kustvakt"
+                    }]
+                }
+            },
+            {
+                "@type": "koral:token",
+                "wrap": {
+                    "@type": "koral:term",
+                    "foundry": "opennlp",
+                    "key": "Alphabet",
+                    "layer": "orth",
+                    "match": "match:eq",
+                    "rewrites": [{
+                        "@type": "koral:rewrite",
+                        "operation": "operation:injection",
+                        "scope": "foundry",
+                        "src": "Kustvakt"
+                    }]
+                }
+            }
+        ],
+        "operation": "operation:sequence"
+    }
+}
