userTO.addAttribute(emailTO);
userTO.addResource("ws-target-resource-nopropagation2");
userTO.addResource("ws-target-resource-nopropagation4");
MembershipTO membershipTO = new MembershipTO();
membershipTO.setRoleId(7L);
userTO.addMembership(membershipTO);
userTO = restTemplate.postForObject(BASE_URL + "user/create", userTO, UserTO.class);
assertNotNull(userTO);
assertEquals("testuser2", userTO.getUsername());
assertEquals(1, userTO.getMemberships().size());
assertEquals(3, userTO.getResources().size());
//-----------------------------
//-----------------------------
// add user template
//-----------------------------
UserTO template = new UserTO();
membershipTO = new MembershipTO();
membershipTO.setRoleId(10L);
template.addMembership(membershipTO);
template.addResource("ws-target-resource-nopropagation4");
//-----------------------------