}
@Test
public void create_UsernameAlreadyExists() {
final Model model = createNiceMock(Model.class);
final NewUser newUser = new NewUser();
final BindingResult errors = createNiceMock(BindingResult.class);
final String username = "canonical"; //specified username already exists in database
final String password = "password";
final String confirmPassword = password;
final User existingUser = new User();
List<ObjectError> errorList = new ArrayList<ObjectError>();
final ObjectError error = new ObjectError("username.exists", "Username already exists");
newUser.setUsername(username);
newUser.setPassword(password);
newUser.setConfirmPassword(confirmPassword);
existingUser.setUsername(username);
existingUser.setPassword(password);
errorList.add(error);