bean.setTemplateName("accountCreated.vm");
}
public void testExecute() throws Exception {
// start SMTP Server
Wiser wiser = new Wiser();
wiser.setPort(getSmtpPort());
wiser.start();
bean.setUsername("user");
assertEquals("success", bean.execute());
assertFalse(bean.hasErrors());
// verify an account information e-mail was sent
wiser.stop();
assertTrue(wiser.getMessages().size() == 1);
// verify that success messages are in the request
assertNotNull(bean.getSession().getAttribute("messages"));
}