public final void testCreateServicesConfig() {
/* Tests relavant to loadbalancer.conf file */
ServiceConfiguration asServiceConfig =
lbConfig.getServiceConfig("wso2.as1.domain",
"worker");
assertEquals(1, asServiceConfig.getInstancesPerScaleUp());
assertEquals(5, asServiceConfig.getMaxAppInstances());
assertEquals(0, asServiceConfig.getMinAppInstances());
assertEquals(60000, asServiceConfig.getMessageExpiryTime());
assertEquals(400, asServiceConfig.getMaxRequestsPerSecond());
assertEquals(0.65, asServiceConfig.getAlarmingUpperRate());
assertEquals(10, asServiceConfig.getRoundsToAverage());
assertEquals("worker", asServiceConfig.getSubDomain());
asServiceConfig = lbConfig.getServiceConfig("wso2.as2.domain", "worker1");
assertEquals("worker1", asServiceConfig.getSubDomain());
asServiceConfig = lbConfig.getServiceConfig("wso2.esb.domain", "mgt");
assertEquals("mgt", asServiceConfig.getSubDomain());
assertEquals(2, lbConfig.getHostNamesTracker().keySet().size());
assertEquals(3, lbConfig.getHostNamesTracker().get("appserver").size());
assertEquals(2, lbConfig.getHostNamesTracker().get("esb").size());