super.setUp();
createRepository();
// Initialize the configBuilder and generate the config files
final MPSPluginConfigValue mps = new MPSPluginConfigValue();
ConfigValueChannelSms sms = new ConfigValueChannelSms();
sms.channelClass = "com.volantis.mps.channels.LogicaSMSChannelAdapter";
sms.name = SMS_CHANNEL;
sms.address = "127.0.0.1";
sms.port = new Integer(PORT);
sms.userName = "test";
sms.password = "test";
sms.bindtype = "async";
sms.supportsMulti = Boolean.FALSE;
mps.channels.add(sms);
ConfigValueChannelMms mms = new ConfigValueChannelMms();
mms.channelClass = "com.volantis.mps.channels.NokiaMMSChannelAdapter";
mms.name = MMS_CHANNEL;
mms.url = "http://127.0.0.1:" + PORT;
mms.defaultCountryCode = new Integer(44);
mps.channels.add(mms);
ConfigValueChannelSmtp smtp = new ConfigValueChannelSmtp();
smtp.channelClass = "com.volantis.mps.channels.SMTPChannelAdapter";
smtp.name = SMTP_CHANNEL;
smtp.hostName = "127.0.0.1";
smtp.authorisationEnabled = Boolean.FALSE;
smtp.userName = "user";
smtp.password = "password";
mps.channels.add(smtp);
MPSAppConfigurator appConf = new MPSAppConfigurator();
appConf.setPluginConfigValue(mps);
volantisBean = new Volantis();
ServletContextStub servletContext = new ServletContextStub();
appManager = new AppManager(volantisBean, servletContext);
appManager.setAppConf(appConf);
PluginConfigFileBuilder builder = new MPSPluginConfigBuilder();
appManager.registerPluginConfigFileBuilder(builder, mps.getClass());
Properties props = System.getProperties();
props.put("mail.smtp.port", new Integer(PORT).toString());
}