Test with different query type

Change-Id: Ia0aec83729e3adbc2c6aa4f8ed76e90c954a8a0b
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestSpanWithinQuery.java b/src/test/java/de/ids_mannheim/korap/query/TestSpanWithinQuery.java
index 858dbf1..574b19a 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestSpanWithinQuery.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestSpanWithinQuery.java
@@ -3,6 +3,7 @@
 import java.util.*;
 import de.ids_mannheim.korap.query.wrap.SpanSequenceQueryWrapper;
 import de.ids_mannheim.korap.query.SpanWithinQuery;
+import de.ids_mannheim.korap.query.SpanElementQuery;
 
 import de.ids_mannheim.korap.util.QueryException;
 
@@ -32,4 +33,20 @@
 
     };
 
+    @Test
+    public void spanSegmentStartsWithQuery () throws QueryException {
+
+        SpanSequenceQueryWrapper ssquery = new SpanSequenceQueryWrapper(
+                "field", "a", "b", "c");
+        SpanWithinQuery ssequery = new SpanWithinQuery(
+                                                       new SpanElementQuery("field", "s"),
+                                                       ssquery.toQuery(),
+                                                       SpanWithinQuery.STARTSWITH,
+                                                       true
+                                                       );
+
+        assertEquals(
+                "spanStartsWith(<field:s />, spanNext(spanNext(field:a, field:b), field:c))",
+                ssequery.toString());
+    };
 };