throw new UsersRepositoryException("Please provide a non null user");
}
if (!(user instanceof DefaultUser)) {
throw new UsersRepositoryException("Please provide a user instanceof DefaultUser");
}
User existingUser = getUserByName(user.getUserName());
if (existingUser == null) {
throw new UsersRepositoryException("Please provide an existing user to update");
}
putUser((DefaultUser) user, false);
}