### Question:
ReminderController { @RequestMapping(value = {"/retrieveusername", "/newpassword"}) public String initialize(ModelMap model, HttpServletRequest request) { model.addAttribute(ModelKeys.CAPTCHA_HTML, captchaService.createHtml(request)); model.addAttribute(ModelKeys.USER, new UserImpl()); return "/retrieveusername".equals(request.getPathInfo()) ? ViewNames.USERNAME_REQUEST : ViewNames.NEW_PASSWORD_REQUEST; } @Autowired protected  ReminderController(UserService userService, NewPasswordValidator passwordValidator, CaptchaService captchaService); @RequestMapping(value = {"/retrieveusername", "/newpassword"}) String initialize(ModelMap model, HttpServletRequest request); @RequestMapping(value = {"/retrieveusername"}, method = RequestMethod.POST) String requestUsername(@ModelAttribute UserForm userForm, BindingResult results, Model model,
                                  HttpServletRequest request, RedirectAttributes redirectAttributes); @RequestMapping(value = {"/newpassword"}, method = RequestMethod.POST) String requestPassword(@ModelAttribute UserForm userForm, BindingResult results, Model model,
                                  HttpServletRequest request, RedirectAttributes redirectAttributes);  }### Answer:
@Test public void testInitialize() throws Exception { final ModelMap model = new ModelMap(); controller.initialize(model, request); assertThat(model, CoreMatchers.notNullValue()); assertEquals("Expected Captcha and User model", 2, model.size()); assertThat(model.containsAttribute(ModelKeys.USER), CoreMatchers.equalTo(true)); assertThat(model.containsAttribute(ModelKeys.CAPTCHA_HTML), CoreMatchers.equalTo(true)); assertThat(model.get(ModelKeys.USER), CoreMatchers.notNullValue()); assertThat(model.get(ModelKeys.CAPTCHA_HTML), CoreMatchers.notNullValue()); assertThat(captchaService.isValid(request), CoreMatchers.equalTo(true)); }