"</last>" +
"<phone type=\"work\">480-300-3003</phone>" +
"</person>";
Collection col = this.client.getCollection(TEST_COLLECTION_PATH);
XUpdateQueryService service = (XUpdateQueryService) col.getService("XUpdateQueryService", "1.0");
long count = service.update(query);
// Bug #30878 fixed: was 6 should be 2. The old code would cause multiple updates.
assertEquals(2, count);
String doc = this.client.getDocument(TEST_COLLECTION_PATH, "doc1");
assertNotNull(doc);
XMLAssert.assertXMLEqual(updatedDocument1, doc);
doc = this.client.getDocument(TEST_COLLECTION_PATH, "doc2");
assertNotNull(doc);
XMLAssert.assertXMLEqual(updatedDocument2, doc);
// test the second query should update 2 docs
count = service.update(query2);
assertEquals(2,count);
// check the second doc to make sure its correct
doc = this.client.getDocument(TEST_COLLECTION_PATH, "doc2");