@Test
public void testInTree() {
dataCreator.createLikeTestDocuments(dataCreator.getFolder11());
String statement = "SELECT * FROM " + COMPLEX_TYPE + " WHERE IN_TREE(" + COMPLEX_TYPE + ", '" + dataCreator.getFolder1() + "')";
ObjectList res = doQuery(statement);
assertEquals(3, res.getObjects().size());
assertTrue(resultContains("likedoc1", res));
assertTrue(resultContains("likedoc2", res));
assertTrue(resultContains("likedoc3", res));
statement = "SELECT * FROM " + COMPLEX_TYPE + " WHERE IN_FOLDER('" + dataCreator.getFolder1() + "')";
res = doQuery(statement);
assertEquals(0, res.getObjects().size());
statement = "SELECT * FROM " + COMPLEX_TYPE + " WHERE IN_TREE('" + dataCreator.getFolder2() + "')";
res = doQuery(statement);
assertEquals(0, res.getObjects().size());
statement = "SELECT * FROM " + COMPLEX_TYPE + " WHERE IN_TREE(UnknownType, '" + dataCreator.getFolder2() + "')";
try {
res = doQuery(statement);
fail("Unknown type in folder should throw exception");