assertTrue(sec.allowUpdate(obj));
assertTrue(sec.allowUpdate(obj,obj.getDetails()));
	public void testAllowUpdate() {				Experimenter e = new Experimenter();		Image i = new Image();				prepareMocksWithUserDetails();				// BASICS				// 1. not system type		sec.setCurrentDetails();		assertFalse(sec.allowUpdate(e));		assertTrue(sec.allowUpdate(i));		sec.clearCurrentDetails();		// 2. is privileged		SecureAction checkAllowCreate = new SecureAction(){			public <T extends IObject> T updateObject(T obj) {				assertTrue(sec.allowUpdate(obj));				return null;			}		};		sec.doAction(e, checkAllowCreate);		sec.doAction(i, checkAllowCreate);				// 3. user is admin.		prepareMocksWithRootDetails();		sec.setCurrentDetails();		assertTrue(sec.allowUpdate(e));		assertTrue(sec.allowUpdate(i));		sec.clearCurrentDetails();				// PERMISSIONS BASED		prepareMocksWithUserDetails();		sec.setCurrentDetails();				// different owner but all permissions		i = new Image(2L);		i.getDetails().setOwner(new Experimenter(2L));		i.getDetails().setGroup(new ExperimenterGroup(2L));		assertTrue(sec.allowUpdate(i));				// now lower permissions		i.getDetails().setPermissions(Permissions.READ_ONLY);		assertFalse(sec.allowUpdate(i));		}