userTO = restTemplate.postForObject(BASE_URL + "user/create", userTO, UserTO.class);
assertFalse(userTO.getDerivedAttributes().isEmpty());
assertEquals(1, userTO.getMemberships().size());
AttributeMod attributeMod = new AttributeMod();
attributeMod.setSchema("subscriptionDate");
attributeMod.addValueToBeAdded("2010-08-18T16:33:12.203+0200");
MembershipMod membershipMod = new MembershipMod();
membershipMod.setRole(8L);
membershipMod.addAttributeToBeUpdated(attributeMod);
UserMod userMod = new UserMod();
userMod.setId(userTO.getId());
userMod.setPassword("newPassword");
userMod.addAttributeToBeRemoved("userId");
attributeMod = new AttributeMod();
attributeMod.setSchema("userId");
attributeMod.addValueToBeAdded("t.w@spre.net");
userMod.addAttributeToBeUpdated(attributeMod);
userMod.addAttributeToBeRemoved("fullname");
attributeMod = new AttributeMod();
attributeMod.setSchema("fullname");
attributeMod.addValueToBeAdded("g.h@t.com");
userMod.addAttributeToBeUpdated(attributeMod);
userMod.addDerivedAttributeToBeAdded("cn");
userMod.addMembershipToBeAdded(membershipMod);
userMod.addMembershipToBeRemoved(userTO.getMemberships().iterator().next().getId());