s3 = (Simple) s.load(Simple.class, new Long(3), LockMode.READ);
assertTrue( s.getCurrentLockMode(s3)==LockMode.UPGRADE );
s4 = (Simple) s.load(Simple.class, new Long(4), LockMode.UPGRADE);
assertTrue( s.getCurrentLockMode(s4)==LockMode.UPGRADE_NOWAIT );
s.lock(s2, LockMode.UPGRADE); //upgrade
assertTrue( s.getCurrentLockMode(s2)==LockMode.UPGRADE );
s.lock(s3, LockMode.UPGRADE);
assertTrue( s.getCurrentLockMode(s3)==LockMode.UPGRADE );
s.lock(s1, LockMode.UPGRADE_NOWAIT);
s.lock(s4, LockMode.NONE);