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");
User.setUsername(username);
User.setPassword(password);
User.setConfirmPassword(confirmPassword);