protected void setUp() throws Exception {
ResourceLoader loader = new ClassPathResourceLoader();
VelocityTemplateEngine engine = new VelocityTemplateEngine(loader);
engine.afterPropertiesSet();
BasicTemplateResolver resolver = new BasicTemplateResolver(engine, loader);
dispatcher = new JavaMailEmailDispatcher();
dispatcher.setResourceLoader(loader);
dispatcher.setTemplateResolver(resolver);
dispatcher.setHost("localhost");