ocm.checkout("/pressrelease1");
ocm.update(pressRelease);
ocm.save();
ocm.checkin("/pressrelease1");
VersionIterator versionIterator = ocm
.getAllVersions("/pressrelease1");
assertNotNull("VersionIterator is null", versionIterator);
assertTrue("Invalid number of versions found", versionIterator
.getSize() == 3);
while (versionIterator.hasNext()) {
Version version = (Version) versionIterator.next();
log.info("version found : " + version.getName() + " - "
+ version.getPath() + " - "
+ version.getCreated().getTime());
if (version.getName().equals("jcr:rootVersion")) {
continue;