this.client.insertDocument(TEST_COLLECTION_PATH, "doc3", document3);
// search all records whose last name begins with 'Smi'
String query = "//person[(string-length(//person/last) >= 3) and (substring(//person/last, 1, 3)='Smi')]";
Collection col = this.client.getCollection(TEST_COLLECTION_PATH);
XPathQueryService xpathservice = (XPathQueryService) col.getService("XPathQueryService", "1.0");
ResourceSet resultSet = xpathservice.query(query);
ResourceIterator results = resultSet.getIterator();
List res = asList(results);
assertEquals(2, res.size());