diff --git a/src/test/java/de/ids_mannheim/korap/index/TestMatchCollector.java b/src/test/java/de/ids_mannheim/korap/index/TestMatchCollector.java
new file mode 100644
index 0000000..f61254b
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMatchCollector.java
@@ -0,0 +1,88 @@
+package de.ids_mannheim.korap.index;
+
+import java.util.*;
+import java.io.*;
+
+import org.apache.lucene.util.Version;
+import org.apache.lucene.util.BytesRef;
+import org.apache.lucene.util.Bits;
+
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Ignore;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KorapMatch;
+import de.ids_mannheim.korap.index.MatchCollector;
+import de.ids_mannheim.korap.KorapCollection;
+import de.ids_mannheim.korap.KorapSearch;
+import de.ids_mannheim.korap.query.SpanNextQuery;
+import de.ids_mannheim.korap.query.SpanMatchModifyClassQuery;
+import de.ids_mannheim.korap.query.SpanClassQuery;
+import de.ids_mannheim.korap.index.FieldDocument;
+import de.ids_mannheim.korap.analysis.MultiTermTokenStream;
+
+import org.apache.lucene.search.spans.SpanQuery;
+import org.apache.lucene.search.spans.SpanOrQuery;
+import org.apache.lucene.search.spans.SpanTermQuery;
+import org.apache.lucene.index.Term;
+
+// mvn -Dtest=TestWithinIndex#indexExample1 test
+
+// match is shrink and split
+
+@RunWith(JUnit4.class)
+public class TestMatchCollector {
+
+    @Test
+    public void indexExample1 () throws IOException {
+	KorapIndex ki = new KorapIndex();
+
+	// abcabcabac
+	FieldDocument fd = new FieldDocument();
+	fd.addString("ID", "doc-1");
+	fd.addString("UID", "1");
+	fd.addTV("base",
+		 "abcabcabac",
+		 "[(0-1)s:a|i:a|_0#0-1|-:t$<i>10]" +
+		 "[(1-2)s:b|i:b|_1#1-2]" +
+		 "[(2-3)s:c|i:c|_2#2-3]" +
+		 "[(3-4)s:a|i:a|_3#3-4]" +
+		 "[(4-5)s:b|i:b|_4#4-5]" +
+		 "[(5-6)s:c|i:c|_5#5-6]" +
+		 "[(6-7)s:a|i:a|_6#6-7]" +
+		 "[(7-8)s:b|i:b|_7#7-8]" +
+		 "[(8-9)s:a|i:a|_8#8-9]" +
+		 "[(9-10)s:c|i:c|_9#9-10]");
+	ki.addDoc(fd);
+
+	fd = new FieldDocument();
+	fd.addString("ID", "doc-2");
+	fd.addString("UID", "2");
+	fd.addTV("base",
+		 "bcbabd",			 
+		 "[(0-1)s:b|i:b|_1#0-1]" +
+		 "[(1-2)s:c|i:c|s:b|_2#1-2]" +			 
+		 "[(2-3)s:b|i:b|_3#2-3|<>:e#2-4$<i>4]" +
+		 "[(3-4)s:a|i:a|_4#3-4|<>:e#3-5$<i>5|<>:e2#3-5$<i>5]" + 
+		 "[(4-5)s:b|i:b|s:c|_5#4-5]" +			 
+		 "[(5-6)s:d|i:d|_6#5-6|<>:e2#5-6$<i>6]");
+	ki.addDoc(fd);
+
+	ki.commit();
+
+	SpanQuery sq;
+
+	sq = new SpanTermQuery(new Term("base", "s:b"));
+	MatchCollector mc = ki.collect(
+	  new KorapSearch(sq).setCount((short) 10),
+	  new MatchCollector()
+	);
+
+	assertEquals(mc.getTotalResults(), 5);
+	assertEquals(mc.getTotalResultDocs(), 2);
+    };
+};
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestRealIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestRealIndex.java
new file mode 100644
index 0000000..1062d4a
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRealIndex.java
@@ -0,0 +1,45 @@
+package de.ids_mannheim.korap.index;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import org.apache.lucene.index.Term;
+import org.apache.lucene.search.spans.SpanQuery;
+import org.apache.lucene.search.spans.SpanTermQuery;
+import org.apache.lucene.store.MMapDirectory;
+import org.junit.Test;
+
+import de.ids_mannheim.korap.*;
+import de.ids_mannheim.korap.util.QueryException;
+
+public class TestRealIndex {
+    KorapIndex ki;
+    KorapResult kr;
+    KorapSearch ks;
+    KorapQuery kq;
+	
+    public TestRealIndex() throws IOException {
+	InputStream is = getClass().getResourceAsStream("/server.properties");
+	Properties prop = new Properties();
+	prop.load(is);
+	
+	String indexPath = prop.getProperty("lucene.indexDir");
+	System.err.println(indexPath);
+	MMapDirectory md = new MMapDirectory(new File(indexPath));
+	ki = new KorapIndex(md);
+    };
+
+    @Test
+    public void testCase1() throws IOException, QueryException {
+	KorapQuery kq = new KorapQuery("tokens");
+	ks = new KorapSearch(kq.within(kq.tag("base/s:s"), kq.seq(kq.re("s:.*")).append(kq._(kq.re("s:.*")))).toQuery());
+	ks.setTimeOut(10000);
+	kr = ks.run(ki);
+	System.err.println(kr.toJSON());
+	assertEquals(8, kr.getTotalResults());
+    };
+}
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestTemporaryQueryLimitations.java b/src/test/java/de/ids_mannheim/korap/query/TestTemporaryQueryLimitations.java
new file mode 100644
index 0000000..f8a2963
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/query/TestTemporaryQueryLimitations.java
@@ -0,0 +1,67 @@
+package de.ids_mannheim.korap.highlight;
+
+import java.util.*;
+import java.io.IOException;
+
+import org.apache.lucene.search.spans.SpanQuery;
+
+import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.KorapSearch;
+import de.ids_mannheim.korap.KorapMatch;
+import de.ids_mannheim.korap.index.FieldDocument;
+
+import de.ids_mannheim.korap.util.QueryException;
+
+import static de.ids_mannheim.korap.TestSimple.*;
+//import static de.ids_mannheim.korap.Test.*;
+
+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 TestTemporaryQueryLimitations {
+
+    @Test
+    public void classRefCheckNotSupported () throws IOException, QueryException  {
+
+	// Construct index
+	KorapIndex ki = new KorapIndex();
+	String json = new String(
+"{" +
+"  \"fields\" : [" +
+"    { "+
+"      \"primaryData\" : \"abc\"" +
+"    }," +
+"    {" +
+"      \"name\" : \"tokens\"," +
+"      \"data\" : [" +
+"         [ \"s:a\", \"i:a\", \"_0#0-1\", \"-:t$<i>3\"]," +
+"         [ \"s:b\", \"i:b\", \"_1#1-2\" ]," +
+"         [ \"s:c\", \"i:c\", \"_2#2-3\" ]" +
+"      ]" +
+"    }" +
+"  ]" +
+"}");
+
+	FieldDocument fd = ki.addDoc(json);
+	ki.commit();
+
+	json = getString(getClass().getResource("/queries/bugs/cosmas_classrefcheck.jsonld").getFile());
+	
+	KorapSearch ks = new KorapSearch(json);
+	KorapResult kr = ks.run(ki);
+	assertEquals(kr.getQuery(),"shrink(130: {131: spanContain({129: <tokens:s />}, {130: tokens:s:wegen})})");
+	assertEquals(kr.totalResults(),0);
+	assertEquals(kr.getStartIndex(),0);
+	assertEquals(
+	    kr.getWarning(),
+	    "classRefCheck is not yet supported - results may not be correct; " +
+	    "This is a warning coming from the serialization");
+
+    };
+};
