@Test public final void shouldReturnSuccess() throws Exception { String result = passwordResetController.processForgotPasswordFormView(EXISTING_USER_NAME); assertEquals("success", result); verify(passwordReminderService, times(1)).generateAndSendNewPassword(EXISTING_USER_NAME); verify(passwordReminderService, never()).generateAndSendNewPassword(not(Mockito.eq(EXISTING_USER_NAME))); }
@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);  }