if (targetId == null) {
Assert.fail("Target not found!");
}
PrivilegesMessageUtil util = new PrivilegesMessageUtil(getXMLXStream(), MediaType.APPLICATION_XML);
PrivilegeResource resource = new PrivilegeResource();
resource.setType(TargetPrivilegeDescriptor.TYPE);
resource.setRepositoryTargetId(targetId);
resource.setName("nxcm1985root");
resource.setDescription("nxcm1985root");
resource.setMethod(Arrays.asList("create", "read", "update", "delete"));
List<PrivilegeStatusResource> privs = util.createPrivileges(resource);
for (PrivilegeStatusResource priv : privs) {
rootPrivIds.add(priv.getId());
}
}