diff --git a/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java
new file mode 100644
index 0000000..9917184
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java
@@ -0,0 +1,131 @@
+import java.util.*;
+import java.io.*;
+
+import org.apache.lucene.search.spans.SpanQuery;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
+
+import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.util.QueryException;
+
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Ignore;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+@RunWith(JUnit4.class)
+public class TestKorapQueryJSON {
+
+    @Ignore
+    public void queryJSONBsp1 () {
+	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp1.json").getFile());
+
+	// ([base=foo]|[base=bar])[base=foobar]
+	assertEquals(sqwi.toQuery().toString(), "");
+    };
+
+    @Test
+    public void queryJSONBsp1b () {
+
+	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp1b.json").getFile());
+
+	// [base=foo]|([base=foo][base=bar]) meta author=Goethe&year=1815
+	assertEquals(sqwi.toQuery().toString(), "spanOr([tokens:base:foo, spanNext(tokens:base:foo, tokens:base:bar)])");
+    };
+
+
+    @Test
+    public void queryJSONBsp2 () {
+	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp2.json").getFile());
+
+	// ([base=foo]|[base=bar])[base=foobar]
+	assertEquals(sqwi.toQuery().toString(), "spanNext(spanOr([tokens:base:foo, tokens:base:bar]), tokens:base:foobar)");
+    };
+
+    @Test
+    public void queryJSONBsp3 () {
+	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp3.json").getFile());
+
+	// shrink({[base=Mann]})
+	assertEquals(sqwi.toQuery().toString(), "shrink(0: {0: tokens:base:Mann})");
+    };
+
+    @Test
+    public void queryJSONBsp4 () {
+	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp4.json").getFile());
+
+	// shrink({[base=foo]}[orth=bar])
+	assertEquals(sqwi.toQuery().toString(), "shrink(0: spanNext({0: tokens:base:foo}, tokens:orth:bar))");
+    };
+
+    @Test
+    public void queryJSONBsp5 () {
+	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp5.json").getFile());
+
+	// shrink(1:[base=Der]{1:[base=Mann]}) 
+	assertEquals(sqwi.toQuery().toString(), "shrink(1: spanNext(tokens:base:Der, {1: tokens:base:Mann}))");
+    };
+
+    @Test
+    public void queryJSONBsp6 () {
+	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp6.json").getFile());
+
+	// [base=katze]
+	assertEquals(sqwi.toQuery().toString(), "tokens:base:Katze");
+    };
+
+    @Ignore
+    public void queryJSONBsp7 () {
+	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp7.json").getFile());
+
+	// [!base=Katze]
+	assertEquals(sqwi.toQuery().toString(), "");
+    };
+
+    @Ignore
+    public void queryJSONBsp8 () {
+	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp8.json").getFile());
+
+	// [!base=Katze]
+	assertEquals(sqwi.toQuery().toString(), "");
+    };
+
+    /*
+    @Test
+    public void queryJSONBsp9 () {
+	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp9.json").getFile());
+
+	// [base=Katze&orth=Katzen]
+	assertEquals(sqwi.toQuery().toString(), "");
+    };
+    */
+
+    public static String getString (String path) {
+	StringBuilder contentBuilder = new StringBuilder();
+	try {
+	    BufferedReader in = new BufferedReader(new FileReader(path));
+	    String str;
+	    while ((str = in.readLine()) != null) {
+		contentBuilder.append(str);
+	    };
+	    in.close();
+	} catch (IOException e) {
+	    fail(e.getMessage());
+	}
+	return contentBuilder.toString();
+    };
+
+    public static SpanQueryWrapperInterface jsonQuery (String jsonFile) {
+	SpanQueryWrapperInterface sqwi;
+	
+	try {
+	    String json = getString(jsonFile);
+	    sqwi = new KorapQuery("tokens").fromJSON(json);
+	}
+	catch (QueryException e) {
+	    fail(e.getMessage());
+	    sqwi = new KorapQuery("tokens").seg("???");
+	};
+	return sqwi;
+    };
+};
\ No newline at end of file
diff --git a/src/test/java/de/ids_mannheim/korap/search/TestKorapSearch.java b/src/test/java/de/ids_mannheim/korap/search/TestKorapSearch.java
index 705bf33..0d62975 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestKorapSearch.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestKorapSearch.java
@@ -90,29 +90,4 @@
 	assertEquals(6, kr.totalResults());
 	assertEquals(kr.getMatch(0).getSnippetBrackets(), "... dem [Buchstaben] A ...");
     };
-
-    @Test
-    public void searchJSON () throws IOException {
-
-	String jsonFile = getClass().getResource("/queries/bsp1.json").getFile();
-
-	KorapSearch ks = new KorapSearch(getString(jsonFile));
-
-	// assertEquals(ks.getQuery().toString(), "");
-    };
-
-    public static String getString (String path) {
-	StringBuilder contentBuilder = new StringBuilder();
-	try {
-	    BufferedReader in = new BufferedReader(new FileReader(path));
-	    String str;
-	    while ((str = in.readLine()) != null) {
-		contentBuilder.append(str);
-	    };
-	    in.close();
-	} catch (IOException e) {
-	}
-	return contentBuilder.toString();
-    };
-
 };
diff --git a/src/test/resources/queries/readme.txt b/src/test/resources/queries/readme.txt
index 5cfd658..36745ce 100644
--- a/src/test/resources/queries/readme.txt
+++ b/src/test/resources/queries/readme.txt
@@ -1,4 +1,4 @@
-bsp1.json: [base=foo]|([base=foo][base=bar]) meta author=Goethe&year=1815
+bsp1.json: [base=foo]|([base=foo][base=bar])* meta author=Goethe&year=1815
 bsp2.json: ([base=foo]|[base=bar])[base=foobar]
 bsp3.json: shrink({[base=Mann]})
 bsp4.json: shrink({[base=foo]}[orth=bar])
