diff --git a/readme.md b/readme.md
index a512921..a5daf8d 100644
--- a/readme.md
+++ b/readme.md
@@ -30,6 +30,8 @@
  
 * Tomcat 7
 
+* Kustvakt (currently unavailable for public) 
+
 ## Installation
 
 KorapSRU is built based on the FCSSimpleEndpoint library provided by CLARIN. KorapSRU 1.0.2-SNAPSHOT uses FCSSimpleEndpoint version 1.3.0 available from CLARIN Nexus repository. To allow Maven to download the library using JDK 1.7, an additional Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 7 is needed.
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 83b8d5d..0f57674 100644
--- a/src/test/java/de/mannheim/ids/korap/test/KorapClientTest.java
+++ b/src/test/java/de/mannheim/ids/korap/test/KorapClientTest.java
@@ -1,5 +1,10 @@
 package de.mannheim.ids.korap.test;
 
+import static org.junit.Assert.assertEquals;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
 import org.apache.http.client.HttpResponseException;
 import org.junit.Test;
 
@@ -10,29 +15,45 @@
 import de.mannheim.ids.korap.sru.QueryLanguage;
 
 
+/**
+ * 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.
+ * 
+ * @author margaretha
+ *
+ */
 public class KorapClientTest {
+    private KorapClient c;
 
-	@Test
-	public void testKorapClient() throws Exception{
-		KorapClient c = new KorapClient(25,50);
-		
-//		prox Kuh
-		KorapResult result = c.query("Haus", QueryLanguage.CQL, "1.2", 1, 5,
-				null);
-		//System.out.println(result.getMatches().size());
-		
-	}
-	
-	@Test
-	public void testResource() throws HttpResponseException, Exception {
-		KorapClient c = new KorapClient(25,50);
-		JsonNode resources = c.retrieveResources();
-		
-		for (JsonNode r : resources){
-			System.out.println(r);
-			System.out.println(r.get("name"));
-		}
 
-	}
-	
+    public KorapClientTest () throws FileNotFoundException {
+        c = new KorapClient(25, 50);
+    }
+
+
+    @Test
+    public void testKorapClient () throws HttpResponseException, IOException {
+        KorapResult 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());
+    }
+
+
+    @Test
+    public void testResource () throws HttpResponseException, Exception {
+        JsonNode resources = c.retrieveResources();
+
+        assertEquals(3, resources.size());
+        assertEquals("Weimarer Werke", resources.get(0).get("name"));
+        assertEquals("Aphorismen", resources.get(0).get("name"));
+        assertEquals("Werther", resources.get(0).get("name"));
+    }
 }
