User newUser = null;
try {
User existingUser = getUser(username);
//The user already exists since now exception, so:
throw new UserAlreadyExistsException();
} catch (UserNotFoundException unfe) {
//The user doesn't already exist so we can create a new user
newUser = new DbUser(username, password, email);
}
return newUser;