// create a node that is lockable and versionable
Node node = testRootNode.addNode(nodeName1, testNodeType);
node.addMixin(mixLockable);
// try to make it versionable if it is not
if (!node.isNodeType(mixVersionable)) {
if (node.canAddMixin(mixVersionable)) {
node.addMixin(mixVersionable);
} else {
throw new NotExecutableException("Node " + nodeName1 + " is " +
"not versionable and does not allow to add " +
"mix:versionable");