Node trn = testSession.getNode(path);
modify(trn.getPath(), Privilege.JCR_VERSION_MANAGEMENT, true);
Node testNode = trn.getNode(n.getName());
Version v = testNode.checkin();
testNode.checkout();
// remove ability to edit version information
// -> VersionHistory.removeVersion must not be allowed.
modify(trn.getPath(), Privilege.JCR_VERSION_MANAGEMENT, false);