final BindingResult errors = createNiceMock(BindingResult.class);
final String username = "u"; //username length less than 2 characters
final String password = "password";
final String confirmPassword = password;
List<ObjectError> errorList = new ArrayList<ObjectError>();
final ObjectError error = new ObjectError("username.invalid.length", "Username must be atleast 2 characters long");
newUser.setUsername(username);
newUser.setPassword(password);
newUser.setConfirmPassword(confirmPassword);