Query query = superuser.getWorkspace().getQueryManager().createQuery(statement, Query.XPATH);
// create a node that is versionable
Node versionable = testRootNode.addNode(nodeName1, testNodeType);
// or try to make it versionable if it is not
if (!versionable.isNodeType(mixVersionable)) {
if (versionable.canAddMixin(mixVersionable)) {
versionable.addMixin(mixVersionable);
} else {
fail("Node " + nodeName1 + " is not versionable and does not allow to add mix:versionable");
}
}