public void testUpdate() throws InstanceNotFoundException,
IncorrectPasswordException, DuplicateInstanceException {
/* Update profile. */
String clearPassword = "userPassword";
User user = registerUser("user@udc.es", clearPassword);
UserDetails newUserDetails = new UserDetails('X' + user.getFirstName(),
'X' + user.getLastName(), 'X' + user.getEmail(), 'X' + "user");
userService.updateUserDetails(user.getUserId(), newUserDetails);
/* Check changes. */
userService.login(user.getLogin(), clearPassword, false);
User user2 = userService.findUser(user.getUserId());
assertEquals(newUserDetails.getFirstName(), user2.getFirstName());
assertEquals(newUserDetails.getLastName(), user2.getLastName());
assertEquals(newUserDetails.getEmail(), user2.getEmail());
}