/**
* Tests the updating of the configuration.
* @throws Throwable
*/
public void testUpdateConfig() throws Throwable {
MailConfigDOM mailConfigDom = new MailConfigDOM();
String xml = this._configManager.getConfigItem(JpmailSystemConstants.MAIL_CONFIG_ITEM);
MailConfig originaryConfig = mailConfigDom.extractConfig(xml);
try {
MailConfig config = this.createMailConfig();
xml = mailConfigDom.createConfigXml(config);
MailConfig updatedConfig = mailConfigDom.extractConfig(xml);
this.compareConfigs(config, updatedConfig);
} catch (Throwable t) {
throw t;
} finally {
xml = mailConfigDom.createConfigXml(originaryConfig);
MailConfig updatedConfig = mailConfigDom.extractConfig(xml);
this.compareConfigs(originaryConfig, updatedConfig);
}
}