* @param dryRun do not register the user, just check if it is possible
* @return errors
*/
public Map<String, String> registerUser(UserDto userDto, Boolean dryRun)
throws IOException, NoConnectionException, JAXBException, UnexpectedErrorException {
User user = createUser(userDto.getUsername(), userDto.getPassword(), userDto.getEmail());
ClientResource clientResource = sendRegistrationRequest(user, dryRun);
Map<String, String> result = getRegistrationResult(clientResource, userDto.getLanguage().getLocale());
closeRestletConnection(clientResource);
return result;
}