@Test
public void testRequestRecoveryToken() throws Exception {

    // start SMTP Server
    Wiser wiser = startWiser(getSmtpPort());
    ResultActions update = mockMvc.perform(get("/requestRecoveryToken").param("username", "admin"))
        .andExpect(status().is3xxRedirection())
        .andExpect(redirectedUrl("/"));
    // verify an account information e-mail was sent
    wiser.stop();
    assertTrue(wiser.getMessages().size() == 1);
    // verify that success messages are in the session
    MvcResult result = update.andReturn();
    MockHttpSession session = (MockHttpSession) result.getRequest().getSession();
    assertNotNull(session.getAttribute(BaseFormController.MESSAGES_KEY));
}