### Question:
NewAccountController { @RequestMapping(value = "/newaccount.jsp") public String setUpForm(ModelMap model, HttpServletRequest request) { logger.debug("Initializing form"); model.addAttribute(ModelKeys.CAPTCHA_HTML, captchaService.createHtml(request)); model.addAttribute(ModelKeys.NEW_USER, new UserImpl()); return ViewNames.NEW_ACCOUNT; } @Autowired  NewAccountController(NewAccountService newAccountService, NewAccountValidator newAccountValidator, CaptchaService captchaService); @RequestMapping(value = "/newaccount.jsp") String setUpForm(ModelMap model, HttpServletRequest request); @RequestMapping(value = {"/newaccount", "/newaccount/*"}, method = RequestMethod.POST) String create(@ModelAttribute(value = "newUser") UserForm newUser, BindingResult results, Model model, HttpServletRequest request,  RedirectAttributes redirectAttributes); @RequestMapping(value = "/openidregister", method = RequestMethod.GET) String setUpOpenIdForm(ModelMap model, HttpServletRequest request);  }### Answer:
@Test public void setUpForm_ShouldAddAttributeForUser() { final ModelMap model = new ModelMap(); String User = ModelKeys.NEW_USER; newAccountController.setUpForm(model, request); assertThat(model, CoreMatchers.notNullValue()); assertThat(model.size(), CoreMatchers.equalTo(2)); assertThat(model.containsAttribute(User), CoreMatchers.equalTo(true)); assertThat(model.get(User), CoreMatchers.notNullValue()); }