diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/CqlQueryProcessor.java b/src/main/java/de/ids_mannheim/korap/query/serialize/CqlQueryProcessor.java
index e2070bf..2dd8985 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/CqlQueryProcessor.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/CqlQueryProcessor.java
@@ -12,7 +12,7 @@
 
 /**
  * @author margaretha
- * @date 09.05.14
+ * @date 30.05.16
  */
 public class CqlQueryProcessor extends AbstractQueryProcessor {
 
@@ -26,12 +26,10 @@
     private static final String OPERATION_OR = "operation:or";
     private static final String OPERATION_SEQUENCE = "operation:sequence";
     private static final String OPERATION_POSITION = "operation:position";
-    private static final String KORAP_CONTEXT = "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld";
 
     private String version;
     private boolean isCaseSensitive; // default true
 
-
     public CqlQueryProcessor (String query) {
         this(query, VERSION_1_2, true);
     }
@@ -41,24 +39,23 @@
     }
 
     public CqlQueryProcessor (String query, String version,
-                              boolean isCaseSensitive) {
+            boolean isCaseSensitive) {
+        super();
         this.version = version;
         this.isCaseSensitive = isCaseSensitive;
-        this.requestMap = new LinkedHashMap<>();
-        requestMap.put("@context", KORAP_CONTEXT);
         process(query);
     }
 
     @Override
-    public Map<String, Object> getRequestMap () {
+    public Map<String, Object> getRequestMap() {
         return this.requestMap;
     }
 
     @Override
-    public void process (String query) {
+    public void process(String query) {
         if ((query == null) || query.isEmpty())
-            addError(StatusCodes.MALFORMED_QUERY,
-                    "SRU diagnostic 27: An empty query is unsupported.");
+            addError(StatusCodes.NO_QUERY,
+                    "SRU diagnostic 27: Empty query is unsupported.");
 
         CQLNode cqlNode = parseQuerytoCQLNode(query);
         Map<String, Object> queryMap = parseCQLNode(cqlNode);
@@ -66,8 +63,7 @@
         // requestMap.put("query", sentenceWrapper(queryMap));
     }
 
-
-    private Map<String, Object> sentenceWrapper (Map<String, Object> m) {
+    private Map<String, Object> sentenceWrapper(Map<String, Object> m) {
         Map<String, Object> map = new LinkedHashMap<String, Object>();
         map.put("@type", "koral:group");
         map.put("operation", OPERATION_POSITION);
@@ -85,8 +81,7 @@
         return map;
     }
 
-
-    private CQLNode parseQuerytoCQLNode (String query) {
+    private CQLNode parseQuerytoCQLNode(String query) {
         try {
             int compat = -1;
             switch (version) {
@@ -105,8 +100,7 @@
         }
     }
 
-
-    private Map<String, Object> parseCQLNode (CQLNode node) {
+    private Map<String, Object> parseCQLNode(CQLNode node) {
 
         if (node instanceof CQLTermNode) {
             return parseTermNode((CQLTermNode) node);
@@ -126,8 +120,7 @@
         }
     }
 
-
-    private Map<String, Object> parseTermNode (CQLTermNode node) {
+    private Map<String, Object> parseTermNode(CQLTermNode node) {
         checkTermNode(node);
         final String term = node.getTerm();
         if ((term == null) || term.isEmpty()) {
@@ -143,8 +136,7 @@
         }
     }
 
-
-    private Map<String, Object> parseAndNode (CQLAndNode node) {
+    private Map<String, Object> parseAndNode(CQLAndNode node) {
         checkBooleanModifier(node);
 
         Map<String, Object> map = new LinkedHashMap<String, Object>();
@@ -169,8 +161,7 @@
         return map;
     }
 
-
-    private Map<String, Object> parseOrNode (CQLOrNode node) {
+    private Map<String, Object> parseOrNode(CQLOrNode node) {
         checkBooleanModifier(node);
 
         Map<String, Object> map = new LinkedHashMap<String, Object>();
@@ -185,8 +176,7 @@
         return map;
     }
 
-
-    private Map<String, Object> writeSequence (String str) {
+    private Map<String, Object> writeSequence(String str) {
         Map<String, Object> sequenceMap = new LinkedHashMap<String, Object>();
         sequenceMap.put("@type", "koral:group");
         sequenceMap.put("operation", OPERATION_SEQUENCE);
@@ -201,8 +191,7 @@
         return sequenceMap;
     }
 
-
-    private Map<String, Object> writeTerm (String term) {
+    private Map<String, Object> writeTerm(String term) {
         Map<String, Object> map = new LinkedHashMap<String, Object>();
         map.put("@type", "koral:term");
         if (!isCaseSensitive) {
@@ -218,8 +207,7 @@
         return tokenMap;
     }
 
-
-    private void checkBooleanModifier (CQLBooleanNode node) {
+    private void checkBooleanModifier(CQLBooleanNode node) {
         List<Modifier> modifiers = node.getModifiers();
         if ((modifiers != null) && !modifiers.isEmpty()) {
             Modifier modifier = modifiers.get(0);
@@ -229,8 +217,7 @@
         }
     }
 
-
-    private void checkTermNode (CQLTermNode node) {
+    private void checkTermNode(CQLTermNode node) {
         // only allow "cql.serverChoice" and "words" index
         if (!(INDEX_CQL_SERVERCHOICE.equals(node.getIndex()) || INDEX_WORDS
                 .equals(node.getIndex()))) {
diff --git a/src/test/java/de/ids_mannheim/korap/query/serialize/CqlQueryProcessorTest.java b/src/test/java/de/ids_mannheim/korap/query/serialize/CqlQueryProcessorTest.java
index 6f2bdd9..5af4b60 100644
--- a/src/test/java/de/ids_mannheim/korap/query/serialize/CqlQueryProcessorTest.java
+++ b/src/test/java/de/ids_mannheim/korap/query/serialize/CqlQueryProcessorTest.java
@@ -3,81 +3,58 @@
 import static org.junit.Assert.assertEquals;
 
 import java.io.IOException;
+import java.util.List;
 
 import org.junit.Test;
 import org.z3950.zing.cql.CQLParseException;
 
-import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 
-import de.ids_mannheim.korap.query.serialize.CqlQueryProcessor;
-import de.ids_mannheim.korap.query.serialize.Cosmas2QueryProcessor;
-
-
 public class CqlQueryProcessorTest {
 
     String query;
-    String version = "1.2";
+    String VERSION = "1.2";
     ObjectMapper mapper = new ObjectMapper();
 
-
-    @Test
-    public void testExceptions () throws CQLParseException, IOException {
-        query = "(Kuh) prox (Germ) ";
-        try {
-            CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, version);
-        }
-        catch (Exception e) {
-            int errorCode = Integer.parseInt(e.getMessage().split(":")[0]
-                    .replace("SRU diagnostic ", ""));
-            assertEquals(48, errorCode);
-        }
-
-        query = "(Kuh) or/rel.combine=sum (Germ) ";
-        try {
-            CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, version);
-        }
-        catch (Exception e) {
-            int errorCode = Integer.parseInt(e.getMessage().split(":")[0]
-                    .replace("SRU diagnostic ", ""));
-            assertEquals(20, errorCode);
-        }
-
-        query = "dc.title any Germ ";
-        try {
-            CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, version);
-        }
-        catch (Exception e) {
-            int errorCode = Integer.parseInt(e.getMessage().split(":")[0]
-                    .replace("SRU diagnostic ", ""));
-            assertEquals(16, errorCode);
-        }
-
-        query = "cql.serverChoice any Germ ";
-        try {
-            CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, version);
-        }
-        catch (Exception e) {
-            int errorCode = Integer.parseInt(e.getMessage().split(":")[0]
-                    .replace("SRU diagnostic ", ""));
-            assertEquals(19, errorCode);
-        }
-
-        query = "";
-        try {
-            CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, version);
-        }
-        catch (Exception e) {
-            int errorCode = Integer.parseInt(e.getMessage().split(":")[0]
-                    .replace("SRU diagnostic ", ""));
-            assertEquals(27, errorCode);
-        }
+    private List<Object> getError(CqlQueryProcessor processor) {
+        List<Object> errors = (List<Object>) processor.requestMap.get("errors");
+        return (List<Object>) errors.get(0);
     }
 
+    @Test
+    public void testExceptions() throws CQLParseException, IOException {
+        query = "(Kuh) prox (Germ) ";
+        CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, VERSION);
+        List<Object> error = getError(cqlTree);
+        assertEquals(
+                "SRU diagnostic 48: Only basic search including term-only "
+                        + "and boolean (AND,OR) operator queries are currently supported.",
+                error.get(1));
+
+        query = "(Kuh) or/rel.combine=sum (Germ) ";
+        error = getError(new CqlQueryProcessor(query, VERSION));
+        assertEquals(
+                "SRU diagnostic 20: Relation modifier rel.combine = sum is not supported.",
+                error.get(1));
+
+        query = "dc.title any Germ ";
+        error = getError(new CqlQueryProcessor(query, VERSION));
+        assertEquals("SRU diagnostic 16: Index dc.title is not supported.",
+                error.get(1));
+
+        query = "cql.serverChoice any Germ ";
+        error = getError(new CqlQueryProcessor(query, VERSION));
+        assertEquals("SRU diagnostic 19: Relation any is not supported.",
+                error.get(1));
+
+        query = "";
+        error = getError(new CqlQueryProcessor(query, VERSION));
+        assertEquals("SRU diagnostic 27: Empty query is unsupported.",
+                error.get(1));
+    }
 
     @Test
-    public void testAndQuery () throws CQLParseException, IOException,
-            Exception {
+    public void testAndQuery() throws CQLParseException, IOException, Exception {
         query = "(Sonne) and (scheint)";
         String jsonLd = "{@type : koral:group, operation : operation:sequence, inOrder : false,"
                 + "distances:[ "
@@ -87,19 +64,20 @@
                 + "{@type : koral:token,wrap : {@type : koral:term,key : scheint,layer : orth,match : match:eq}"
                 + "}]}";
 
-        CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, version);
+        CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, VERSION);
         String serializedQuery = mapper.writeValueAsString(cqlTree
                 .getRequestMap().get("query"));
         assertEquals(jsonLd.replace(" ", ""), serializedQuery.replace("\"", ""));
-        //			/System.out.println(serializedQuery);
-        //CosmasTree ct = new CosmasTree("Sonne und scheint");
-        //serializedQuery = mapper.writeValueAsString(ct.getRequestMap().get("query"));
-        //assertEquals(jsonLd.replace(" ", ""), serializedQuery.replace("\"", ""));
+        // /System.out.println(serializedQuery);
+        // CosmasTree ct = new CosmasTree("Sonne und scheint");
+        // serializedQuery =
+        // mapper.writeValueAsString(ct.getRequestMap().get("query"));
+        // assertEquals(jsonLd.replace(" ", ""),
+        // serializedQuery.replace("\"", ""));
     }
 
-
     @Test
-    public void testBooleanQuery () throws CQLParseException, IOException,
+    public void testBooleanQuery() throws CQLParseException, IOException,
             Exception {
         query = "((Sonne) or (Mond)) and (scheint)";
         String jsonLd = "{@type:koral:group, operation:operation:sequence, inOrder : false, distances:["
@@ -111,12 +89,11 @@
                 + "]},"
                 + "{@type:koral:token, wrap:{@type:koral:term, key:scheint, layer:orth, match:match:eq}}"
                 + "]}";
-        CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, version);
+        CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, VERSION);
         String serializedQuery = mapper.writeValueAsString(cqlTree
                 .getRequestMap().get("query"));
         assertEquals(jsonLd.replace(" ", ""), serializedQuery.replace("\"", ""));
 
-
         query = "(scheint) and ((Sonne) or (Mond))";
         jsonLd = "{@type:koral:group, operation:operation:sequence, inOrder : false, distances:["
                 + "{@type:koral:distance, key:s, min:0, max:0}"
@@ -126,23 +103,22 @@
                 + "{@type:koral:token, wrap:{@type:koral:term, key:Sonne, layer:orth, match:match:eq}},"
                 + "{@type:koral:token, wrap:{@type:koral:term, key:Mond, layer:orth, match:match:eq}}"
                 + "]}" + "]}";
-        cqlTree = new CqlQueryProcessor(query, version);
+        cqlTree = new CqlQueryProcessor(query, VERSION);
         serializedQuery = mapper.writeValueAsString(cqlTree.getRequestMap()
                 .get("query"));
         assertEquals(jsonLd.replace(" ", ""), serializedQuery.replace("\"", ""));
 
     }
 
-
     @Test
-    public void testOrQuery () throws CQLParseException, IOException, Exception {
+    public void testOrQuery() throws CQLParseException, IOException, Exception {
         query = "(Sonne) or (Mond)";
         String jsonLd = "{@type:koral:group, operation:operation:or, operands:["
                 + "{@type:koral:token, wrap:{@type:koral:term, key:Sonne, layer:orth, match:match:eq}},"
                 + "{@type:koral:token, wrap:{@type:koral:term, key:Mond, layer:orth, match:match:eq}}"
                 + "]}";
 
-        CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, version);
+        CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, VERSION);
         String serializedQuery = mapper.writeValueAsString(cqlTree
                 .getRequestMap().get("query"));
         assertEquals(jsonLd.replace(" ", ""), serializedQuery.replace("\"", ""));
@@ -156,7 +132,7 @@
                 + "{@type:koral:token, wrap:{@type:koral:term, key:Mond, layer:orth, match:match:eq}}"
                 + "]}";
 
-        cqlTree = new CqlQueryProcessor(query, version);
+        cqlTree = new CqlQueryProcessor(query, VERSION);
         serializedQuery = mapper.writeValueAsString(cqlTree.getRequestMap()
                 .get("query"));
         assertEquals(jsonLd.replace(" ", ""), serializedQuery.replace("\"", ""));
@@ -171,27 +147,25 @@
                 + "{@type:koral:token, wrap:{@type:koral:term, key:Mond, layer:orth, match:match:eq}},"
                 + "{@type:koral:token, wrap:{@type:koral:term, key:scheint, layer:orth, match:match:eq}}"
                 + "]}" + "]}";
-        cqlTree = new CqlQueryProcessor(query, version);
+        cqlTree = new CqlQueryProcessor(query, VERSION);
         serializedQuery = mapper.writeValueAsString(cqlTree.getRequestMap()
                 .get("query"));
         assertEquals(jsonLd.replace(" ", ""), serializedQuery.replace("\"", ""));
     }
 
-
     @Test
-    public void testTermQuery () throws CQLParseException, IOException,
+    public void testTermQuery() throws CQLParseException, IOException,
             Exception {
         query = "Sonne";
         String jsonLd = "{@type:koral:token, wrap:{@type:koral:term, key:Sonne, layer:orth, match:match:eq}}";
-        CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, version);
+        CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, VERSION);
         String serializedQuery = mapper.writeValueAsString(cqlTree
                 .getRequestMap().get("query"));
         assertEquals(jsonLd.replace(" ", ""), serializedQuery.replace("\"", ""));
     }
 
-
     @Test
-    public void testPhraseQuery () throws CQLParseException, IOException,
+    public void testPhraseQuery() throws CQLParseException, IOException,
             Exception {
         query = "\"der Mann\"";
         String jsonLd = "{@type:koral:group, operation:operation:sequence, operands:["
@@ -199,12 +173,11 @@
                 + "{@type:koral:token, wrap:{@type:koral:term, key:Mann, layer:orth, match:match:eq}}"
                 + "]}";
 
-        CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, version);
+        CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, VERSION);
         String serializedQuery = mapper.writeValueAsString(cqlTree
                 .getRequestMap().get("query"));
         assertEquals(jsonLd.replace(" ", ""), serializedQuery.replace("\"", ""));
 
-
         query = "der Mann schläft";
         jsonLd = "{@type:koral:group, operation:operation:sequence, operands:["
                 + "{@type:koral:token, wrap:{@type:koral:term, key:der, layer:orth, match:match:eq}},"
@@ -212,7 +185,7 @@
                 + "{@type:koral:token, wrap:{@type:koral:term, key:schläft, layer:orth, match:match:eq}}"
                 + "]}";
 
-        cqlTree = new CqlQueryProcessor(query, version);
+        cqlTree = new CqlQueryProcessor(query, VERSION);
         serializedQuery = mapper.writeValueAsString(cqlTree.getRequestMap()
                 .get("query"));
         assertEquals(jsonLd.replace(" ", ""), serializedQuery.replace("\"", ""));
