* @param xpath the xpath query.
* @param nodes the expected result nodes.
*/
protected void executeXPathQuery(Session session, String xpath, Node[] nodes)
throws RepositoryException {
QueryResult res = session.getWorkspace().getQueryManager().createQuery(xpath, Query.XPATH).execute();
checkResult(res, nodes);
}