added test case for multiple ANDs
diff --git a/src/test/java/CosmasTreeTest.java b/src/test/java/CosmasTreeTest.java
index 55d2c8e..a4e31cf 100644
--- a/src/test/java/CosmasTreeTest.java
+++ b/src/test/java/CosmasTreeTest.java
@@ -184,6 +184,26 @@
ct = new CosmasTree(query);
map = ct.getRequestMap().get("query").toString();
assertEquals(orand2.replaceAll(" ", ""), map.replaceAll(" ", ""));
+
+ query="Regen und scheint und (Sonne oder Mond)";
+ String orand3 =
+ "{@type=korap:group, operation=operation:sequence, distances=[" +
+ "{@type=korap:distance, key=t, min=0, max=0}" +
+ "], operands=[" +
+ "{@type=korap:token, wrap={@type=korap:term, key=Regen, layer=orth, match=match:eq}}," +
+ "{@type=korap:group, operation=operation:sequence, distances=[" +
+ "{@type=korap:distance, key=t, min=0, max=0}" +
+ "], operands=[" +
+ "{@type=korap:token, wrap={@type=korap:term, key=scheint, layer=orth, match=match:eq}}," +
+ "{@type=korap:group, operation=operation:or, operands=[" +
+ "{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}," +
+ "{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
+ "]}" +
+ "]}" +
+ "]}";
+ ct = new CosmasTree(query);
+ map = ct.getRequestMap().get("query").toString();
+ assertEquals(orand3.replaceAll(" ", ""), map.replaceAll(" ", ""));
}
@Test