permission.setConstraint(constraint);
constraint.setExpession(expression);
model.getEClassifiers().add(permission);
// Create protected object with region attribute
PObject pObject = uamFactory.createPObject();
pObject.setName("TestProtectedObject");
EAttribute pObjectRegionAttr = getRegionAttr();
pObject.getEStructuralFeatures().add(pObjectRegionAttr);
pObject.getPermission().add(permission);
// permission.setPObject(pObject);
// EMFUtil.addPobject(permission, pObject);
model.getEClassifiers().add(pObject);
// create operation
POperation operation = UamFactory.eINSTANCE.createPOperation();
operation.setName("TestOperation");
pObject.getEOperations().add(operation);
// Create role
Role role = uamFactory.createRole();
role.setName("TestRole");
EReference permissionRef = EMFUtil.addPermission(role, permission);