//TODO: add createRoleType switch to the API
IdentityObjectRelationship rel = getRepository().createRelationship(getInvocationContext(), createIdentityObject(identity), createIdentityObject(group), ROLE, roleType.getName(), false);
//TODO: null id - IdentityObjectRelationship doesn't have id
return new SimpleRole(new SimpleRoleType(rel.getName()), createIdentity(rel.getFromIdentityObject()), createGroup(rel.getToIdentityObject()));
}