}
// We have changed http port to 8081 and https to 9443, lets write back
ConfigurationWriteDelegate cwd = new ConfigurationWriteDelegate(configDef, getDomainControllerASConnection(), a);
ConfigurationUpdateReport report = new ConfigurationUpdateReport(conf);
cwd.updateResourceConfiguration(report);
assert report.getStatus() == ConfigurationUpdateStatus.SUCCESS;
// now check the result (and change back)
Configuration conf2 = loadDelegate.loadResourceConfiguration();
assert conf2 != null : "Did not get a configuration back";
List<Property> pl2 = conf.getList("*").getList();
for (Property p : pl2) {
PropertyMap pm = (PropertyMap) p;
Map<String, Property> pmap = pm.getMap();
PropertySimple name = (PropertySimple) pmap.get("name");
assert name != null;
assert name.getStringValue() != null;
if ("http".equals(name.getStringValue())) {
PropertySimple portProp = (PropertySimple) pmap.get("port");
assert portProp != null;
assert portProp.getStringValue() != null;
portProp.setStringValue("8080");
}
if ("https".equals(name.getStringValue())) {
PropertySimple portProp = (PropertySimple) pmap.get("port");
assert portProp != null;
assert portProp.getStringValue() != null;
portProp.setStringValue("8443");
}
}
report = new ConfigurationUpdateReport(conf);
cwd.updateResourceConfiguration(report);
assert report.getStatus() == ConfigurationUpdateStatus.SUCCESS;
}