diff --git a/src/test/java/de/mannheim/ids/korap/test/KorapClientTest.java b/src/test/java/de/mannheim/ids/korap/test/KorapClientTest.java
index 21a9642..5fed239 100644
--- a/src/test/java/de/mannheim/ids/korap/test/KorapClientTest.java
+++ b/src/test/java/de/mannheim/ids/korap/test/KorapClientTest.java
@@ -4,6 +4,7 @@
 
 import java.io.FileNotFoundException;
 import java.io.IOException;
+import java.net.URISyntaxException;
 
 import org.apache.http.client.HttpResponseException;
 import org.junit.Test;
@@ -11,6 +12,7 @@
 import com.fasterxml.jackson.databind.JsonNode;
 
 import de.mannheim.ids.korap.sru.KorapClient;
+import de.mannheim.ids.korap.sru.KorapMatch;
 import de.mannheim.ids.korap.sru.KorapResult;
 import de.mannheim.ids.korap.sru.QueryLanguage;
 
@@ -19,6 +21,7 @@
  * The tests are based on the sample corpus from the Goethe corpus.
  * Skip the tests if Kustvakt does not have this corpus in the Krill
  * index.
+ * 
  * The tests require a running KustvaktServer.
  * Specify the Kustvakt service URI in the configuration file at
  * src/main/resources/kustvakt.conf.
@@ -28,7 +31,8 @@
  */
 public class KorapClientTest {
     private KorapClient c;
-
+    private KorapResult result;
+    private KorapMatch match;
 
     public KorapClientTest () throws FileNotFoundException {
         c = new KorapClient(25, 50);
@@ -36,22 +40,64 @@
 
 
     @Test
-    public void testKorapClient () throws HttpResponseException, IOException {
-        KorapResult result = c.query("Haus", QueryLanguage.CQL, "1.2", 1, 25,
+    public void testCQLQuery () throws HttpResponseException, IOException {
+        result = c.query("Haus", QueryLanguage.CQL, "1.2", 1, 25,
                 null);
-        assertEquals(25, result.getMatches().size());
-
-        result = c.query("(\"blaue\"|\"grüne\")", QueryLanguage.FCSQL, "2.0", 1,
-                25, null);
-        assertEquals(25, result.getMatches().size());
+        assertEquals(25, result.getMatchSize());
+        assertEquals(136, result.getTotalResults());
+    
+        match = result.getMatch(0);
+        assertEquals("match-GOE/AGF/00000-p8891-8892",match.getMatchId());
+        
+        match.parseMatchId();
+        assertEquals("GOE", match.getCorpusId());
+        assertEquals("AGF", match.getDocId());
+        assertEquals("p8891-8892", match.getPositionId());
+        
     }
 
-
     @Test
-    public void testResource () throws HttpResponseException, Exception {
+    public void testFCS2Query() throws HttpResponseException, IOException {
+    	result = c.query("(\"blaue\"|\"grüne\")", QueryLanguage.FCSQL, "2.0", 1,
+                25, null);
+    	
+    	assertEquals(25, result.getMatchSize());
+        assertEquals(96, result.getTotalResults());
+
+        match = result.getMatch(0);
+        assertEquals("match-GOE/AGF/00000-p7667-7668",match.getMatchId());
+        
+        match.parseMatchId();
+        assertEquals("GOE", match.getCorpusId());
+        assertEquals("AGF", match.getDocId());
+        assertEquals("p7667-7668", match.getPositionId());
+	}
+    
+    @Test
+    public void testRetrieveAnnotations() throws IOException, URISyntaxException {
+    	String annotationSnippet = KorapClient.retrieveAnnotations(
+    			"GOE", "AGF", "00000",
+    			"p7667-7668", "*");
+    	
+    	assertEquals(true, annotationSnippet.startsWith("<snippet><span class="
+    			+ "\"context-left\"></span><span class=\"match\"><span title="));
+	}
+    
+    @Test
+    public void testRetrieveNonexistingAnnotation() throws IOException, URISyntaxException {
+    	String annotationSnippet = KorapClient.retrieveAnnotations(
+    			"WPD15", "D18", "06488",
+    			"p588-589", "*");
+    	
+    	assertEquals("<snippet></snippet>", annotationSnippet);
+	}
+    
+    @Test
+    public void testRetrieveResource () throws HttpResponseException, Exception {
         JsonNode resources = c.retrieveResources();
 
-        assertEquals(1, resources.size());
+        //assertEquals(1, resources.size());
         assertEquals("Wikipedia", resources.get(0).get("name").asText());
+        assertEquals("Deutsche Wikipedia 2015", resources.get(0).get("description").asText());
     }
 }
