@Test public final void shouldReturnUserNotFound() throws Exception { String result = passwordResetController.processForgotPasswordFormView("userThatDoesNotExists"); assertEquals("userNotFound", result); verify(passwordReminderService, times(1)).generateAndSendNewPassword(Mockito.anyString()); }
@RequestMapping(value = "passwordReset", method = RequestMethod.POST) @ResponseBody public String processForgotPasswordFormView(@RequestParam final String login) { if (StringUtils.isBlank(login)) { return "loginIsBlank"; } return performPasswordReseting(login); }
PasswordResetController { @RequestMapping(value = "passwordReset", method = RequestMethod.POST) @ResponseBody public String processForgotPasswordFormView(@RequestParam final String login) { if (StringUtils.isBlank(login)) { return "loginIsBlank"; } return performPasswordReseting(login); } }
PasswordResetController { @RequestMapping(value = "passwordReset", method = RequestMethod.POST) @ResponseBody public String processForgotPasswordFormView(@RequestParam final String login) { if (StringUtils.isBlank(login)) { return "loginIsBlank"; } return performPasswordReseting(login); }  }
PasswordResetController { @RequestMapping(value = "passwordReset", method = RequestMethod.POST) @ResponseBody public String processForgotPasswordFormView(@RequestParam final String login) { if (StringUtils.isBlank(login)) { return "loginIsBlank"; } return performPasswordReseting(login); }  @RequestMapping(value = "passwordReset", method = RequestMethod.GET) ModelAndView getForgotPasswordFormView(@RequestParam(required = false, defaultValue = FALSE) final Boolean iframe,
            @RequestParam(required = false, defaultValue = FALSE) final Boolean popup, final Locale locale); @RequestMapping(value = "passwordReset", method = RequestMethod.POST) @ResponseBody String processForgotPasswordFormView(@RequestParam final String login); }
PasswordResetController { @RequestMapping(value = "passwordReset", method = RequestMethod.POST) @ResponseBody public String processForgotPasswordFormView(@RequestParam final String login) { if (StringUtils.isBlank(login)) { return "loginIsBlank"; } return performPasswordReseting(login); }  @RequestMapping(value = "passwordReset", method = RequestMethod.GET) ModelAndView getForgotPasswordFormView(@RequestParam(required = false, defaultValue = FALSE) final Boolean iframe,
            @RequestParam(required = false, defaultValue = FALSE) final Boolean popup, final Locale locale); @RequestMapping(value = "passwordReset", method = RequestMethod.POST) @ResponseBody String processForgotPasswordFormView(@RequestParam final String login);  }