ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW, true);
session.save();
parent = (NodeImpl)session.getItem("/testRoot");
VersionHistoryImporter versionHistoryImporter =
new VersionHistoryImporter((NodeImpl)parent, new ByteArrayInputStream(vhout.toByteArray()), baseVersion,
predecessorsHistory, versionHistory);
versionHistoryImporter.doImport();
session.save();
// import second time with replace existing flag
session.importXML("/", new ByteArrayInputStream(out.toByteArray()),
ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING, true);
session.save();
parent = (NodeImpl)session.getItem("/testRoot");
versionHistoryImporter =
new VersionHistoryImporter((NodeImpl)parent, new ByteArrayInputStream(vhout.toByteArray()), baseVersion,
predecessorsHistory, versionHistory);
versionHistoryImporter.doImport();
session.save();
// try to restore first version
parent.restore("1", true);