public void testEndsWithSearchQuery() throws Exception
{
// search all records whose last name begins with 'ith'
String query = "//person[(string-length(//person/last) >= 4) and (substring(//person/last, 2)='mith')]";
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());