userTO.addAttribute(attributeTO("email", "testuser2@syncope.apache.org"));
userTO.addResource(RESOURCE_NAME_NOPROPAGATION2);
userTO.addResource(RESOURCE_NAME_NOPROPAGATION4);
MembershipTO membershipTO = new MembershipTO();
membershipTO.setRoleId(7L);
userTO.addMembership(membershipTO);
userTO = createUser(userTO);
assertNotNull(userTO);
assertEquals("testuser2", userTO.getUsername());
assertEquals(1, userTO.getMemberships().size());
assertEquals(3, userTO.getResources().size());
//-----------------------------
try {
//-----------------------------
// add user template
//-----------------------------
UserTO template = new UserTO();
membershipTO = new MembershipTO();
membershipTO.setRoleId(10L);
template.addMembership(membershipTO);
template.addResource(RESOURCE_NAME_NOPROPAGATION4);
//-----------------------------