You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ra...@apache.org on 2015/11/24 07:23:12 UTC

[2/2] stratos git commit: cleaning integration tests

cleaning integration tests


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/9514aef5
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/9514aef5
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/9514aef5

Branch: refs/heads/stratos-4.1.x
Commit: 9514aef53e3dbb1b4b41f6da554b9a4373d2856c
Parents: 3da3045
Author: rajkumar <rr...@gmail.com>
Authored: Tue Nov 24 11:52:37 2015 +0530
Committer: rajkumar <rr...@gmail.com>
Committed: Tue Nov 24 11:52:37 2015 +0530

----------------------------------------------------------------------
 .../ApplicationBurstingTestCase.java            |  95 ++++++-------
 .../ApplicationStartupOrderTestCase.java        |  95 +++++++------
 .../application/SampleApplicationsTestCase.java |   4 +-
 .../SingleClusterScalingTestCase.java           |  62 +++++----
 .../app-bursting-single-cartriddge-group.json   |  70 ----------
 .../applications/application-bursting-test.json |  70 ++++++++++
 .../application-policy-1.json                   |  17 ---
 ...n-policy-application-startup-order-test.json |  17 +++
 .../application-startup-order-test.json         | 135 +++++++++++++++++++
 .../applications/application.json               | 135 -------------------
 .../autoscaling-policy-1.json                   |  14 --
 ...g-policy-application-startup-order-test.json |  14 ++
 ...pp-group-application-startup-order-test.json |  20 +++
 .../cartridges-groups/app-group.json            |  20 ---
 ...db-group-application-startup-order-test.json |  13 ++
 .../cartridges-groups/db-group.json             |  13 --
 .../esb-application-startup-order-test.json     |  50 +++++++
 .../cartridges/mock/esb.json                    |  50 -------
 .../mysql-application-startup-order-test.json   |  50 +++++++
 .../cartridges/mock/mysql.json                  |  50 -------
 .../php-application-startup-order-test.json     |  51 +++++++
 .../cartridges/mock/php.json                    |  51 -------
 ...postgres-application-startup-order-test.json |  50 +++++++
 .../cartridges/mock/postgres.json               |  50 -------
 .../tomcat-application-startup-order-test.json  |  53 ++++++++
 .../cartridges/mock/tomcat.json                 |  53 --------
 ...policy-1-application-startup-order-test.json |  15 +++
 .../deployment-policy-1.json                    |  15 ---
 ...policy-2-application-startup-order-test.json |  29 ++++
 .../deployment-policy-2.json                    |  29 ----
 ...tition-1-application-startup-order-test.json |  15 +++
 .../mock/network-partition-1.json               |  15 ---
 ...tition-2-application-startup-order-test.json |  24 ++++
 .../mock/network-partition-2.json               |  24 ----
 ...dige-nested-sample-applications-test-v1.json |  50 -------
 ...rtrdige-nested-sample-applications-test.json |  50 -------
 ...rtridge-nested-sample-applications-test.json |  50 +++++++
 ...ment-policy-sample-applications-test-v1.json |  36 -----
 ...partition-sample-applications-test-1-v1.json |  28 ----
 39 files changed, 783 insertions(+), 899 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTestCase.java
index 8268d11..a782ae5 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTestCase.java
@@ -40,12 +40,20 @@ import static org.testng.AssertJUnit.assertTrue;
 public class ApplicationBurstingTestCase extends StratosIntegrationTest {
     private static final Log log = LogFactory.getLog(ApplicationBurstingTestCase.class);
     private static final String RESOURCES_PATH = "/application-bursting-test";
-
+    private static final String autoscalingPolicyId = "autoscaling-policy-application-bursting-test";
+    private static final String cartridgeId1 = "esb-application-bursting-test";
+    private static final String cartridgeId2 = "php-application-bursting-test";
+    private static final String cartridgeId3 = "tomcat-application-bursting-test";
+    private static final String cartridgeGroupId = "esb-php-group-application-bursting-test";
+    private static final String networkPartition1 = "network-partition-application-bursting-test-1";
+    private static final String networkPartition2 = "network-partition-application-bursting-test-2";
+    private static final String deploymentPolicyId = "deployment-policy-application-bursting-test";
+    private static final String applicationId = "application-bursting-test";
+    private static final String applicationPolicyId = "application-policy-application-bursting-test";
 
     @Test(timeOut = APPLICATION_TEST_TIMEOUT, groups = {"stratos.application.deployment"})
     public void testApplicationBusting() throws Exception {
         TopologyHandler topologyHandler = TopologyHandler.getInstance();
-        String autoscalingPolicyId = "autoscaling-policy-application-bursting-test";
 
         boolean addedScalingPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
                         + "/" + autoscalingPolicyId + ".json",
@@ -53,67 +61,62 @@ public class ApplicationBurstingTestCase extends StratosIntegrationTest {
         assertTrue(addedScalingPolicy);
 
         boolean addedC1 = restClient.addEntity(
-                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "esb-application-bursting-test.json",
+                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId1 + ".json",
                 RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
         assertTrue(addedC1);
 
         boolean addedC2 = restClient.addEntity(
-                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "php-application-bursting-test.json",
+                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId2 + ".json",
                 RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
         assertTrue(addedC2);
 
         boolean addedC3 = restClient.addEntity(
-                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "tomcat-application-bursting-test.json",
+                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId3 + ".json",
                 RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
         assertTrue(addedC3);
 
         boolean addedG1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
-                        "/" + "esb-php-group-application-bursting-test.json", RestConstants.CARTRIDGE_GROUPS,
+                        "/" + cartridgeGroupId + ".json", RestConstants.CARTRIDGE_GROUPS,
                 RestConstants.CARTRIDGE_GROUPS_NAME);
         assertTrue(addedG1);
 
         CartridgeGroupBean beanG1 = (CartridgeGroupBean) restClient.
-                getEntity(RestConstants.CARTRIDGE_GROUPS, "esb-php-group-application-bursting-test",
+                getEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId,
                         CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
-        assertEquals(beanG1.getName(), "esb-php-group-application-bursting-test");
+        assertEquals(beanG1.getName(), cartridgeGroupId);
 
         boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                        "network-partition-application-bursting-test-1.json",
+                        networkPartition1 + ".json",
                 RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
         assertTrue(addedN1);
 
         boolean addedN2 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                        "network-partition-application-bursting-test-2.json",
+                        networkPartition2 + ".json",
                 RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
         assertTrue(addedN2);
 
         boolean addedDep = restClient.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
-                        "deployment-policy-application-bursting-test.json",
+                        deploymentPolicyId + ".json",
                 RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
         assertTrue(addedDep);
 
         boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
-                        "app-bursting-single-cartriddge-group.json", RestConstants.APPLICATIONS,
+                        applicationId + ".json", RestConstants.APPLICATIONS,
                 RestConstants.APPLICATIONS_NAME);
         assertTrue(added);
 
         ApplicationBean bean = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
-                "application-bursting-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-        assertEquals(bean.getApplicationId(), "application-bursting-test");
+                applicationId, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+        assertEquals(bean.getApplicationId(), applicationId);
 
         boolean addAppPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
-                        "application-policy-application-bursting-test.json", RestConstants.APPLICATION_POLICIES,
+                        applicationPolicyId + ".json", RestConstants.APPLICATION_POLICIES,
                 RestConstants.APPLICATION_POLICIES_NAME);
         assertTrue(addAppPolicy);
 
-        ApplicationPolicyBean policyBean = (ApplicationPolicyBean) restClient.getEntity(
-                RestConstants.APPLICATION_POLICIES,
-                "application-policy-application-bursting-test", ApplicationPolicyBean.class,
-                RestConstants.APPLICATION_POLICIES_NAME);
-
         //deploy the application
-        String resourcePath = RestConstants.APPLICATIONS + "/" + "application-bursting-test" +
-                RestConstants.APPLICATIONS_DEPLOY + "/" + "application-policy-application-bursting-test";
+        String resourcePath = RestConstants.APPLICATIONS + "/" + applicationId +
+                RestConstants.APPLICATIONS_DEPLOY + "/" + applicationPolicyId;
         boolean deployed = restClient.deployEntity(resourcePath,
                 RestConstants.APPLICATIONS_NAME);
         assertTrue(deployed);
@@ -129,7 +132,7 @@ public class ApplicationBurstingTestCase extends StratosIntegrationTest {
         topologyHandler.assertClusterActivation(bean.getApplicationId());
 
         boolean removedGroup =
-                restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, "esb-php-group-application-bursting-test",
+                restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId,
                         RestConstants.CARTRIDGE_GROUPS_NAME);
         assertFalse(removedGroup);
 
@@ -138,59 +141,57 @@ public class ApplicationBurstingTestCase extends StratosIntegrationTest {
         assertFalse(removedAuto);
 
         boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                "network-partition-application-bursting-test-1",
-                RestConstants.NETWORK_PARTITIONS_NAME);
-        //Trying to remove the used network partition
+                networkPartition1, RestConstants.NETWORK_PARTITIONS_NAME);
         assertFalse(removedNet);
 
         boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                "deployment-policy-application-bursting-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+                deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
         assertFalse(removedDep);
 
         //Un-deploying the application
-        String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + "application-bursting-test" +
+        String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + applicationId +
                 RestConstants.APPLICATIONS_UNDEPLOY;
 
         boolean unDeployed = restClient.undeployEntity(resourcePathUndeploy,
                 RestConstants.APPLICATIONS_NAME);
         assertTrue(unDeployed);
 
-        boolean undeploy = topologyHandler.assertApplicationUndeploy("application-bursting-test");
+        boolean undeploy = topologyHandler.assertApplicationUndeploy(applicationId);
         if (!undeploy) {
             //Need to forcefully undeploy the application
-            log.info("Force undeployment is going to start for the [application] " + "application-bursting-test");
+            log.info(String.format("Force undeployment is going to start for the [application] %s ", applicationId));
 
-            restClient.undeployEntity(RestConstants.APPLICATIONS + "/" + "application-bursting-test" +
+            restClient.undeployEntity(RestConstants.APPLICATIONS + "/" + applicationId +
                     RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
 
-            boolean forceUndeployed = topologyHandler.assertApplicationUndeploy("application-bursting-test");
+            boolean forceUndeployed = topologyHandler.assertApplicationUndeploy(applicationId);
             assertTrue(String.format("Forceful undeployment failed for the application %s",
-                    "application-bursting-test"), forceUndeployed);
+                    applicationId), forceUndeployed);
 
         }
 
-        boolean removed = restClient.removeEntity(RestConstants.APPLICATIONS, "application-bursting-test",
+        boolean removed = restClient.removeEntity(RestConstants.APPLICATIONS, applicationId,
                 RestConstants.APPLICATIONS_NAME);
         assertTrue(removed);
 
         ApplicationBean beanRemoved = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
-                "application-bursting-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+                applicationId, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
         assertNull(beanRemoved);
 
         removedGroup =
-                restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, "esb-php-group-application-bursting-test",
+                restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId,
                         RestConstants.CARTRIDGE_GROUPS_NAME);
         assertTrue(removedGroup);
 
-        boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, "esb-application-bursting-test",
+        boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId1,
                 RestConstants.CARTRIDGES_NAME);
         assertTrue(removedC1);
 
-        boolean removedC2 = restClient.removeEntity(RestConstants.CARTRIDGES, "php-application-bursting-test",
+        boolean removedC2 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId2,
                 RestConstants.CARTRIDGES_NAME);
         assertTrue(removedC2);
 
-        boolean removedC3 = restClient.removeEntity(RestConstants.CARTRIDGES, "tomcat-application-bursting-test",
+        boolean removedC3 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId3,
                 RestConstants.CARTRIDGES_NAME);
         assertTrue(removedC3);
 
@@ -199,27 +200,19 @@ public class ApplicationBurstingTestCase extends StratosIntegrationTest {
         assertTrue(removedAuto);
 
         removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                "deployment-policy-application-bursting-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+                deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
         assertTrue(removedDep);
 
         removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                "network-partition-application-bursting-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+                networkPartition1, RestConstants.NETWORK_PARTITIONS_NAME);
         assertFalse(removedNet);
 
         boolean removedN2 = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                "network-partition-application-bursting-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
+                networkPartition2, RestConstants.NETWORK_PARTITIONS_NAME);
         assertFalse(removedN2);
 
         boolean removeAppPolicy = restClient.removeEntity(RestConstants.APPLICATION_POLICIES,
-                "application-policy-application-bursting-test", RestConstants.APPLICATION_POLICIES_NAME);
+                applicationPolicyId, RestConstants.APPLICATION_POLICIES_NAME);
         assertTrue(removeAppPolicy);
-
-        removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                "network-partition-application-bursting-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
-        assertTrue(removedNet);
-
-        removedN2 = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                "network-partition-application-bursting-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
-        assertTrue(removedN2);
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationStartupOrderTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationStartupOrderTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationStartupOrderTestCase.java
index 46acc97..bde6b04 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationStartupOrderTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationStartupOrderTestCase.java
@@ -34,6 +34,19 @@ import org.testng.annotations.Test;
  */
 public class ApplicationStartupOrderTestCase extends StratosIntegrationTest {
     private static final String RESOURCES_PATH = "/application-startup-order-test";
+    private static final String autoscalingPolicyId = "autoscaling-policy-application-startup-order-test";
+    private static final String cartridgeId1 = "esb-application-startup-order-test";
+    private static final String cartridgeId2 = "php-application-startup-order-test";
+    private static final String cartridgeId3 = "mysql-application-startup-order-test";
+    private static final String cartridgeId4 = "postgres-application-startup-order-test";
+    private static final String cartridgeId5 = "tomcat-application-startup-order-test";
+    private static final String cartridgeGroupId1 = "app-group-application-startup-order-test";
+    private static final String cartridgeGroupId2 = "db-group-application-startup-order-test";
+    private static final String networkPartitionId1 = "network-partition-1-application-startup-order-test";
+    private static final String networkPartitionId2 = "network-partition-2-application-startup-order-test";
+    private static final String deploymentPolicyId1 = "deployment-policy-1-application-startup-order-test";
+    private static final String deploymentPolicyId2 = "deployment-policy-2-application-startup-order-test";
+    private static final String applicationId = "application-startup-order-test";
 
     @Rule
     public ExpectedException thrown = ExpectedException.none();
@@ -43,8 +56,7 @@ public class ApplicationStartupOrderTestCase extends StratosIntegrationTest {
     	
     	thrown.expect(RuntimeException.class);
     	thrown.expectMessage(
-    			"{\"status\":\"error\",\"message\":\"The startup-order defined in the [application] my-compositeapp is not correct. [startup-order-alias] group.my-dbgroup3333 is not there in the application.\"}");
-        String autoscalingPolicyId = "autoscaling-policy-1";
+    			"{\"status\":\"error\",\"message\":\"The startup-order defined in the [application] application-startup-order-test is not correct. [startup-order-alias] group.my-dbgroup3333 is not there in the application.\"}");
 
         boolean addedScalingPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
                         + "/" + autoscalingPolicyId + ".json",
@@ -52,79 +64,77 @@ public class ApplicationStartupOrderTestCase extends StratosIntegrationTest {
         assertTrue(addedScalingPolicy);
 
         boolean addedC1 = restClient.addEntity(
-                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "esb.json",
+                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId1 + ".json",
                 RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
         assertTrue(addedC1);
 
         boolean addedC2 = restClient.addEntity(
-                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "php.json",
+                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId2 + ".json",
                 RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
         assertTrue(addedC2);
 
         boolean addedC3 = restClient.addEntity(
-                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "mysql.json",
+                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId3 + ".json",
                 RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
         assertTrue(addedC3);
 
+        boolean addedC4 = restClient.addEntity(
+                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId4 + ".json",
+                RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+        assertTrue(addedC4);
+
         boolean addedC5 = restClient.addEntity(
-                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "postgres.json",
+                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId5 + ".json",
                 RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
         assertTrue(addedC5);
 
-        boolean addedC6 = restClient.addEntity(
-                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "tomcat.json",
-                RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-        assertTrue(addedC6);
+        boolean addedG1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
+                        "/" + cartridgeGroupId1 + ".json", RestConstants.CARTRIDGE_GROUPS,
+                RestConstants.CARTRIDGE_GROUPS_NAME);
+        assertTrue(addedG1);
 
         boolean addedG2 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
-                        "/" + "app-group.json", RestConstants.CARTRIDGE_GROUPS,
+                        "/" + cartridgeGroupId2 + ".json", RestConstants.CARTRIDGE_GROUPS,
                 RestConstants.CARTRIDGE_GROUPS_NAME);
         assertTrue(addedG2);
 
-        boolean addedG3 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
-                        "/" + "db-group.json", RestConstants.CARTRIDGE_GROUPS,
-                RestConstants.CARTRIDGE_GROUPS_NAME);
-        assertTrue(addedG3);
-
         boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                        "network-partition-1.json",
+                        networkPartitionId1 + ".json",
                 RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
         assertTrue(addedN1);
-        
+
         boolean addedN2 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                		"network-partition-2.json",
+                        networkPartitionId2 + ".json",
         RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
         assertTrue(addedN2);
-        
+
         boolean addedDep1 = restClient.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
-                        "deployment-policy-1.json",
+                        deploymentPolicyId1 + ".json",
                 RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
         assertTrue(addedDep1);
-        
+
         boolean addedDep2 = restClient.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
-                        "deployment-policy-2.json",
+                        deploymentPolicyId2 + ".json",
                 RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
         assertTrue(addedDep2);
             	     			
     	try {
-    	  restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
-                        "application.json", RestConstants.APPLICATIONS,
+            restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
+                            applicationId + ".json", RestConstants.APPLICATIONS,
                 RestConstants.APPLICATIONS_NAME);
         	fail("Should throw an exception if the aliases mentioned in dependency order section are not defined");
     	} catch (Exception e) {
     		assertThat(
-    				e.getMessage(),containsString("The startup-order defined in the [application] my-compositeapp is not correct. [startup-order-alias] group.my-dbgroup3333 is not there in the application."));
+    				e.getMessage(),containsString("The startup-order defined in the [application] application-startup-order-test is not correct. [startup-order-alias] group.my-dbgroup3333 is not there in the application."));
     	}
-
-    	
     	// Clean up        
         boolean removedGroup = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS,
-                "app-group",
+                cartridgeGroupId1,
                 RestConstants.CARTRIDGE_GROUPS_NAME);
         assertTrue(removedGroup);
 
         removedGroup = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS,
-                "db-group",
+                cartridgeGroupId2,
                 RestConstants.CARTRIDGE_GROUPS_NAME);
         assertTrue(removedGroup);
 
@@ -133,44 +143,41 @@ public class ApplicationStartupOrderTestCase extends StratosIntegrationTest {
         assertTrue(removedAuto);   
                 
         boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                "deployment-policy-1", RestConstants.DEPLOYMENT_POLICIES_NAME);
+                deploymentPolicyId1, RestConstants.DEPLOYMENT_POLICIES_NAME);
         assertTrue(removedDep);
         
         removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                "deployment-policy-2", RestConstants.DEPLOYMENT_POLICIES_NAME);
+                deploymentPolicyId2, RestConstants.DEPLOYMENT_POLICIES_NAME);
         assertTrue(removedDep);
         
         boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                "network-partition-1",
+                networkPartitionId1,
                 RestConstants.NETWORK_PARTITIONS_NAME);
         assertTrue(removedNet);
         
         removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                "network-partition-2",
+                networkPartitionId2,
                 RestConstants.NETWORK_PARTITIONS_NAME);
         assertTrue(removedNet);
-        
-        boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, "php",
+
+        boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId1,
                 RestConstants.CARTRIDGES_NAME);
         assertTrue(removedC1);
-
-        boolean removedC2 = restClient.removeEntity(RestConstants.CARTRIDGES, "tomcat",
+        
+        boolean removedC2 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId2,
                 RestConstants.CARTRIDGES_NAME);
         assertTrue(removedC2);
 
-        boolean removedC3 = restClient.removeEntity(RestConstants.CARTRIDGES, "postgres",
+        boolean removedC3 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId3,
                 RestConstants.CARTRIDGES_NAME);
         assertTrue(removedC3);
 
-        boolean removedC4 = restClient.removeEntity(RestConstants.CARTRIDGES, "mysql",
+        boolean removedC4 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId4,
                 RestConstants.CARTRIDGES_NAME);
         assertTrue(removedC4);
 
-        boolean removedC5 = restClient.removeEntity(RestConstants.CARTRIDGES, "esb",
+        boolean removedC5 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId5,
                 RestConstants.CARTRIDGES_NAME);
         assertTrue(removedC5);
-
-        assertTrue(true);
     }
-   
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTestCase.java
index 2dcf88f..581115a 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTestCase.java
@@ -70,7 +70,7 @@ public class SampleApplicationsTestCase extends StratosIntegrationTest {
         assertEquals(addedC3, true);
 
         boolean addedG1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
-                        "/" + "cartrdige-nested-sample-applications-test.json", RestConstants.CARTRIDGE_GROUPS,
+                        "/" + "cartridge-nested-sample-applications-test.json", RestConstants.CARTRIDGE_GROUPS,
                 RestConstants.CARTRIDGE_GROUPS_NAME);
         assertEquals(addedG1, true);
 
@@ -270,7 +270,7 @@ public class SampleApplicationsTestCase extends StratosIntegrationTest {
             assertEquals(addedC3, true);
 
             boolean addedG1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
-                            "/" + "cartrdige-nested-sample-applications-test.json", RestConstants.CARTRIDGE_GROUPS,
+                            "/" + "cartridge-nested-sample-applications-test.json", RestConstants.CARTRIDGE_GROUPS,
                     RestConstants.CARTRIDGE_GROUPS_NAME);
             assertEquals(addedG1, true);
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTestCase.java
index 18806dc..ffdb81d 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTestCase.java
@@ -49,6 +49,12 @@ import static org.testng.AssertJUnit.assertTrue;
 public class SingleClusterScalingTestCase extends StratosIntegrationTest {
     private static final Log log = LogFactory.getLog(SingleClusterScalingTestCase.class);
     private static final String RESOURCES_PATH = "/single-cluster-scaling-test";
+    private static final String autoscalingPolicyId = "autoscaling-policy-single-cluster-scaling-test";
+    private static final String cartridgeId = "c7-single-cluster-scaling-test";
+    private static final String networkPartitionId = "network-partition-single-cluster-scaling-test";
+    private static final String deploymentPolicyId = "deployment-policy-single-cluster-scaling-test";
+    private static final String applicationPolicyId = "application-policy-single-cluster-scaling-test";
+    private static final String applicationId = "single-cluster-scaling-test";
     private static final int CLUSTER_SCALE_UP_TIMEOUT = 180000;
     private static final int CLUSTER_SCALE_DOWN_TIMEOUT = 360000;
     private int activeInstancesAfterScaleup = 0;
@@ -56,7 +62,6 @@ public class SingleClusterScalingTestCase extends StratosIntegrationTest {
     @Test(timeOut = APPLICATION_TEST_TIMEOUT, groups = {"stratos.application.deployment"})
     public void testDeployApplication() throws Exception {
         TopologyHandler topologyHandler = TopologyHandler.getInstance();
-        String autoscalingPolicyId = "autoscaling-policy-single-cluster-scaling-test";
 
         boolean addedScalingPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
                         + "/" + autoscalingPolicyId + ".json",
@@ -64,42 +69,37 @@ public class SingleClusterScalingTestCase extends StratosIntegrationTest {
         assertEquals(addedScalingPolicy, true);
 
         boolean addedC1 = restClient.addEntity(
-                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c7-single-cluster-scaling-test.json",
+                RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId + ".json",
                 RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
         assertEquals(addedC1, true);
 
         boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                        "network-partition-single-cluster-scaling-test.json",
+                        networkPartitionId + ".json",
                 RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
         assertEquals(addedN1, true);
 
         boolean addedDep = restClient.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
-                        "deployment-policy-single-cluster-scaling-test.json",
+                        deploymentPolicyId + ".json",
                 RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
         assertEquals(addedDep, true);
 
         boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
-                        "single-cluster-scaling-test.json", RestConstants.APPLICATIONS,
+                        applicationId + ".json", RestConstants.APPLICATIONS,
                 RestConstants.APPLICATIONS_NAME);
         assertEquals(added, true);
 
         ApplicationBean bean = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
-                "single-cluster-scaling-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-        assertEquals(bean.getApplicationId(), "single-cluster-scaling-test");
+                applicationId, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+        assertEquals(bean.getApplicationId(), applicationId);
 
         boolean addAppPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
-                        "application-policy-single-cluster-scaling-test.json", RestConstants.APPLICATION_POLICIES,
+                        applicationPolicyId + ".json", RestConstants.APPLICATION_POLICIES,
                 RestConstants.APPLICATION_POLICIES_NAME);
         assertEquals(addAppPolicy, true);
 
-        ApplicationPolicyBean policyBean = (ApplicationPolicyBean) restClient.getEntity(
-                RestConstants.APPLICATION_POLICIES,
-                "application-policy-single-cluster-scaling-test", ApplicationPolicyBean.class,
-                RestConstants.APPLICATION_POLICIES_NAME);
-
         //deploy the application
-        String resourcePath = RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
-                RestConstants.APPLICATIONS_DEPLOY + "/" + "application-policy-single-cluster-scaling-test";
+        String resourcePath = RestConstants.APPLICATIONS + "/" + applicationId +
+                RestConstants.APPLICATIONS_DEPLOY + "/" + applicationPolicyId;
         boolean deployed = restClient.deployEntity(resourcePath,
                 RestConstants.APPLICATIONS_NAME);
         assertEquals(deployed, true);
@@ -125,68 +125,66 @@ public class SingleClusterScalingTestCase extends StratosIntegrationTest {
         assertEquals(removedAuto, false);
 
         boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                "network-partition-single-cluster-scaling-test",
+                networkPartitionId,
                 RestConstants.NETWORK_PARTITIONS_NAME);
         //Trying to remove the used network partition
         assertEquals(removedNet, false);
 
         boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                "deployment-policy-single-cluster-scaling-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+                deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
         assertEquals(removedDep, false);
 
         //Un-deploying the application
-        String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
+        String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + applicationId +
                 RestConstants.APPLICATIONS_UNDEPLOY;
 
         boolean unDeployed = restClient.undeployEntity(resourcePathUndeploy,
                 RestConstants.APPLICATIONS_NAME);
         assertEquals(unDeployed, true);
 
-        boolean undeploy = topologyHandler.assertApplicationUndeploy("single-cluster-scaling-test");
+        boolean undeploy = topologyHandler.assertApplicationUndeploy(applicationId);
         if (!undeploy) {
             //Need to forcefully undeploy the application
-            log.info("Force undeployment is going to start for the [application] " + "single-cluster-scaling-test");
+            log.info(String.format("Force undeployment is going to start for the [application] %s", applicationId));
 
-            restClient.undeployEntity(RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
+            restClient.undeployEntity(RestConstants.APPLICATIONS + "/" + applicationId+
                     RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
 
-            boolean forceUndeployed = topologyHandler.assertApplicationUndeploy("single-cluster-scaling-test");
+            boolean forceUndeployed = topologyHandler.assertApplicationUndeploy(applicationId);
             assertTrue(String.format("Forceful undeployment failed for the application %s",
-                    "single-cluster-scaling-test"), forceUndeployed);
+                    applicationId), forceUndeployed);
         }
 
-        boolean removed = restClient.removeEntity(RestConstants.APPLICATIONS, "single-cluster-scaling-test",
+        boolean removed = restClient.removeEntity(RestConstants.APPLICATIONS, applicationId,
                 RestConstants.APPLICATIONS_NAME);
         assertEquals(removed, true);
 
         ApplicationBean beanRemoved = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
-                "single-cluster-scaling-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+                applicationId, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
         assertEquals(beanRemoved, null);
 
-        boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, "c7-single-cluster-scaling-test",
+        boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId,
                 RestConstants.CARTRIDGES_NAME);
         assertEquals(removedC1, true);
 
-
         removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
                 autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
         assertEquals(removedAuto, true);
 
         removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                "deployment-policy-single-cluster-scaling-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+                deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
         assertEquals(removedDep, true);
 
         removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                "network-partition-single-cluster-scaling-test", RestConstants.NETWORK_PARTITIONS_NAME);
+                networkPartitionId, RestConstants.NETWORK_PARTITIONS_NAME);
         assertEquals(removedNet, false);
 
-
         boolean removeAppPolicy = restClient.removeEntity(RestConstants.APPLICATION_POLICIES,
-                "application-policy-single-cluster-scaling-test", RestConstants.APPLICATION_POLICIES_NAME);
+                applicationPolicyId, RestConstants.APPLICATION_POLICIES_NAME);
         assertEquals(removeAppPolicy, true);
 
         removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                "network-partition-single-cluster-scaling-test", RestConstants.NETWORK_PARTITIONS_NAME);
+                networkPartitionId, RestConstants.NETWORK_PARTITIONS_NAME);
         assertEquals(removedNet, true);
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/applications/app-bursting-single-cartriddge-group.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/applications/app-bursting-single-cartriddge-group.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/applications/app-bursting-single-cartriddge-group.json
deleted file mode 100644
index c091ec5..0000000
--- a/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/applications/app-bursting-single-cartriddge-group.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
-    "applicationId": "application-bursting-test",
-    "alias": "my-cartridge-group-app",
-    "components": {
-        "groups": [
-            {
-                "name": "esb-php-group-application-bursting-test",
-                "alias": "my-esb-php-group-application-bursting-test",
-                "deploymentPolicy": "deployment-policy-application-bursting-test",
-                "groupMinInstances": 1,
-                "groupMaxInstances": 2,
-                "cartridges": [
-                    {
-                        "type": "esb-application-bursting-test",
-                        "cartridgeMin": 1,
-                        "cartridgeMax": 2,
-                        "subscribableInfo": {
-                            "alias": "my-esb-application-bursting-test",
-                            "autoscalingPolicy": "autoscaling-policy-application-bursting-test",
-                            "artifactRepository": {
-                                "privateRepo": false,
-                                "repoUrl": "https://github.com/imesh/stratos-esb-applications.git",
-                                "repoUsername": "",
-                                "repoPassword": ""
-                            }
-                        }
-                    },
-                    {
-                        "type": "php-application-bursting-test",
-                        "cartridgeMin": 2,
-                        "cartridgeMax": 4,
-                        "lvsVirtualIP": "192.168.56.50|255.255.255.0",
-                        "subscribableInfo": {
-                            "alias": "my-php-application-bursting-test",
-                            "autoscalingPolicy": "autoscaling-policy-application-bursting-test",
-                            "artifactRepository": {
-                                "privateRepo": false,
-                                "repoUrl": "https://github.com/imesh/stratos-php-applications.git",
-                                "repoUsername": "",
-                                "repoPassword": ""
-                            }
-                        }
-                    }
-                ]
-            }
-        ],
-        "cartridges": [
-            {
-                "type": "tomcat-application-bursting-test",
-                "cartridgeMin": 2,
-                "cartridgeMax": 4,
-                "subscribableInfo": {
-                    "alias": "my-tomcat-application-bursting-test",
-                    "autoscalingPolicy": "autoscaling-policy-application-bursting-test",
-                    "deploymentPolicy": "deployment-policy-application-bursting-test",
-                    "artifactRepository": {
-                        "privateRepo": false,
-                        "repoUrl": "https://github.com/imesh/stratos-tomcat-applications.git",
-                        "repoUsername": "",
-                        "repoPassword": ""
-                    }
-                }
-            }
-        ],
-        "dependencies": {
-            "terminationBehaviour": "terminate-none"
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/applications/application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/applications/application-bursting-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/applications/application-bursting-test.json
new file mode 100644
index 0000000..c091ec5
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/applications/application-bursting-test.json
@@ -0,0 +1,70 @@
+{
+    "applicationId": "application-bursting-test",
+    "alias": "my-cartridge-group-app",
+    "components": {
+        "groups": [
+            {
+                "name": "esb-php-group-application-bursting-test",
+                "alias": "my-esb-php-group-application-bursting-test",
+                "deploymentPolicy": "deployment-policy-application-bursting-test",
+                "groupMinInstances": 1,
+                "groupMaxInstances": 2,
+                "cartridges": [
+                    {
+                        "type": "esb-application-bursting-test",
+                        "cartridgeMin": 1,
+                        "cartridgeMax": 2,
+                        "subscribableInfo": {
+                            "alias": "my-esb-application-bursting-test",
+                            "autoscalingPolicy": "autoscaling-policy-application-bursting-test",
+                            "artifactRepository": {
+                                "privateRepo": false,
+                                "repoUrl": "https://github.com/imesh/stratos-esb-applications.git",
+                                "repoUsername": "",
+                                "repoPassword": ""
+                            }
+                        }
+                    },
+                    {
+                        "type": "php-application-bursting-test",
+                        "cartridgeMin": 2,
+                        "cartridgeMax": 4,
+                        "lvsVirtualIP": "192.168.56.50|255.255.255.0",
+                        "subscribableInfo": {
+                            "alias": "my-php-application-bursting-test",
+                            "autoscalingPolicy": "autoscaling-policy-application-bursting-test",
+                            "artifactRepository": {
+                                "privateRepo": false,
+                                "repoUrl": "https://github.com/imesh/stratos-php-applications.git",
+                                "repoUsername": "",
+                                "repoPassword": ""
+                            }
+                        }
+                    }
+                ]
+            }
+        ],
+        "cartridges": [
+            {
+                "type": "tomcat-application-bursting-test",
+                "cartridgeMin": 2,
+                "cartridgeMax": 4,
+                "subscribableInfo": {
+                    "alias": "my-tomcat-application-bursting-test",
+                    "autoscalingPolicy": "autoscaling-policy-application-bursting-test",
+                    "deploymentPolicy": "deployment-policy-application-bursting-test",
+                    "artifactRepository": {
+                        "privateRepo": false,
+                        "repoUrl": "https://github.com/imesh/stratos-tomcat-applications.git",
+                        "repoUsername": "",
+                        "repoPassword": ""
+                    }
+                }
+            }
+        ],
+        "dependencies": {
+            "terminationBehaviour": "terminate-none"
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/application-policies/application-policy-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/application-policies/application-policy-1.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/application-policies/application-policy-1.json
deleted file mode 100644
index 3ae0932..0000000
--- a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/application-policies/application-policy-1.json
+++ /dev/null
@@ -1,17 +0,0 @@
-	{
-    "id": "application-policy-1",
-    "algorithm": "one-after-another",
-    "networkPartitions": [
-        "network-partition-1"
-    ],
-    "properties": [
-        {
-            "name": "key-1",
-            "value": "value-1"
-        },
-        {
-            "name": "key-2",
-            "value": "value-2"
-        }
-    ]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/application-policies/application-policy-application-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/application-policies/application-policy-application-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/application-policies/application-policy-application-startup-order-test.json
new file mode 100644
index 0000000..e2a2848
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/application-policies/application-policy-application-startup-order-test.json
@@ -0,0 +1,17 @@
+	{
+    "id": "application-policy-application-startup-order-test",
+    "algorithm": "one-after-another",
+    "networkPartitions": [
+        "network-partition-1"
+    ],
+    "properties": [
+        {
+            "name": "key-1",
+            "value": "value-1"
+        },
+        {
+            "name": "key-2",
+            "value": "value-2"
+        }
+    ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/applications/application-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/applications/application-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/applications/application-startup-order-test.json
new file mode 100644
index 0000000..edb06f3
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/applications/application-startup-order-test.json
@@ -0,0 +1,135 @@
+{
+    "alias": "application-startup-order-test",
+    "applicationId": "application-startup-order-test",
+    "components": {
+        "groups": [
+            {
+                "name": "app-group-application-startup-order-test",
+                "alias": "my-appgroup-application-startup-order-test",
+                "cartridges": [
+                    {
+                        "type": "tomcat-application-startup-order-test",
+                        "cartridgeMax": 2,
+                        "cartridgeMin": 1,
+                        "subscribableInfo": {
+                            "alias": "my-tomcat-application-startup-order-test",
+                            "artifactRepository": {
+                                "alias": "my-tomcat-application-startup-order-test",
+                                "privateRepo": true,
+                                "repoPassword": "password",
+                                "repoUrl": "http://xxx:10080/git/default.git",
+                                "repoUsername": "user"
+                            },
+                            "autoscalingPolicy": "autoscaling-policy-application-startup-order-test",
+                            "deploymentPolicy": "deployment-policy-1-application-startup-order-test"
+                        }
+                    },
+                    {
+                        "type": "php-application-startup-order-test",
+                        "cartridgeMax": 2,
+                        "cartridgeMin": 1,
+                        "subscribableInfo": {
+                            "alias": "my-php-application-startup-order-test",
+                            "artifactRepository": {
+                                "privateRepo": true,
+                                "repoPassword": "password",
+                                "repoUrl": "http://xxx:10080/git/default.git",
+                                "repoUsername": "user"
+                            },
+                            "autoscalingPolicy": "autoscaling-policy-application-startup-order-test",
+                            "deploymentPolicy": "deployment-policy-1-application-startup-order-test"
+                        }
+                    }
+                ],
+                "groupMaxInstances": 2,
+                "groupMinInstances": 1,
+                "groupScalingEnabled": true
+            },
+            {
+                "name": "db-group-application-startup-order-test",
+                "alias": "my-dbgroup-application-startup-order-test",
+                "cartridges": [
+                    {
+                        "type": "postgres-application-startup-order-test",
+                        "cartridgeMax": 2,
+                        "cartridgeMin": 1,
+                        "subscribableInfo": {
+                            "alias": "my-postgres-application-startup-order-test",
+                            "artifactRepository": {
+                                "alias": "my-postgres-application-startup-order-test",
+                                "privateRepo": false,
+                                "repoPassword": "password",
+                                "repoUrl": "http://xxx:10080/git/default.git",
+                                "repoUsername": "user"
+                            },
+                            "autoscalingPolicy": "autoscaling-policy-application-startup-order-test",
+                            "deploymentPolicy": "deployment-policy-1-application-startup-order-test"
+                        }
+                    },
+                    {
+                        "type": "mysql-application-startup-order-test",
+                        "cartridgeMax": 2,
+                        "cartridgeMin": 1,
+                        "subscribableInfo": {
+                            "alias": "my-mysql-application-startup-order-test",
+                            "artifactRepository": {
+                                "alias": "my-mysql-application-startup-order-test",
+                                "privateRepo": true,
+                                "repoPassword": "password",
+                                "repoUrl": "http://xxx:10080/git/default.git",
+                                "repoUsername": "user"
+                            },
+                            "autoscalingPolicy": "autoscaling-policy-application-startup-order-test",
+                            "deploymentPolicy": "deployment-policy-1-application-startup-order-test"
+                        }
+                    }
+                ],
+                "groupMaxInstances": 2,
+                "groupMinInstances": 1,
+                "groupScalingEnabled": true
+            }
+        ],
+        "cartridges": [
+            {
+                "type": "esb-application-startup-order-test",
+                "cartridgeMax": 2,
+                "cartridgeMin": 1,
+                "subscribableInfo": {
+                    "alias": "my-esb-application-startup-order-test",
+                    "artifactRepository": {
+                        "privateRepo": true,
+                        "repoPassword": "password",
+                        "repoUrl": "http://xxx:10080/git/default.git",
+                        "repoUsername": "user"
+                    },
+                    "autoscalingPolicy": "autoscaling-policy-application-startup-order-test",
+                    "deploymentPolicy": "deployment-policy-1-application-startup-order-test"
+                }
+            }
+        ],
+        "dependencies": {
+            "scalingDependents": [
+                {
+                    "aliases": [
+                        "group.my-appgroup-application-startup-order-test, cartridge.my-esb-application-startup-order-test"
+                    ]
+                }
+            ],
+            "startupOrders": [
+                {
+                    "aliases": [
+                        "group.my-dbgroup3333",
+                        "group.my-appgroup5555"
+                    ]
+                },
+                {
+                    "aliases": [
+                        "group.my-dbgroup555",
+                        "cartridge.my-esb66666"
+                    ]
+                }
+            ],
+            "terminationBehaviour": "terminate-none"
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/applications/application.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/applications/application.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/applications/application.json
deleted file mode 100644
index cc38810..0000000
--- a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/applications/application.json
+++ /dev/null
@@ -1,135 +0,0 @@
-{
-    "alias": "mycompositeapp",
-    "applicationId": "my-compositeapp",
-    "components": {
-        "groups": [
-            {
-                "name": "app-group",
-                "alias": "my-appgroup",
-                "cartridges": [
-                    {
-                        "type": "tomcat",
-                        "cartridgeMax": 2,
-                        "cartridgeMin": 1,
-                        "subscribableInfo": {
-                            "alias": "my-tomcat",
-                            "artifactRepository": {
-                                "alias": "my-tomcat",
-                                "privateRepo": true,
-                                "repoPassword": "password",
-                                "repoUrl": "http://xxx:10080/git/default.git",
-                                "repoUsername": "user"
-                            },
-                            "autoscalingPolicy": "autoscaling-policy-1",
-                            "deploymentPolicy": "deployment-policy-1"
-                        }
-                    },
-                    {
-                        "type": "php",
-                        "cartridgeMax": 2,
-                        "cartridgeMin": 1,
-                        "subscribableInfo": {
-                            "alias": "my-php",
-                            "artifactRepository": {
-                                "privateRepo": true,
-                                "repoPassword": "password",
-                                "repoUrl": "http://xxx:10080/git/default.git",
-                                "repoUsername": "user"
-                            },
-                            "autoscalingPolicy": "autoscaling-policy-1",
-                            "deploymentPolicy": "deployment-policy-1"
-                        }
-                    }
-                ],
-                "groupMaxInstances": 2,
-                "groupMinInstances": 1,
-                "groupScalingEnabled": true
-            },
-            {
-                "name": "db-group",
-                "alias": "my-dbgroup",
-                "cartridges": [
-                    {
-                        "type": "postgres",
-                        "cartridgeMax": 2,
-                        "cartridgeMin": 1,
-                        "subscribableInfo": {
-                            "alias": "my-postgres",
-                            "artifactRepository": {
-                                "alias": "my-postgres",
-                                "privateRepo": false,
-                                "repoPassword": "password",
-                                "repoUrl": "http://xxx:10080/git/default.git",
-                                "repoUsername": "user"
-                            },
-                            "autoscalingPolicy": "autoscaling-policy-1",
-                            "deploymentPolicy": "deployment-policy-1"
-                        }
-                    },
-                    {
-                        "type": "mysql",
-                        "cartridgeMax": 2,
-                        "cartridgeMin": 1,
-                        "subscribableInfo": {
-                            "alias": "my-mysql",
-                            "artifactRepository": {
-                                "alias": "my-mysql",
-                                "privateRepo": true,
-                                "repoPassword": "password",
-                                "repoUrl": "http://xxx:10080/git/default.git",
-                                "repoUsername": "user"
-                            },
-                            "autoscalingPolicy": "autoscaling-policy-1",
-                            "deploymentPolicy": "deployment-policy-1"
-                        }
-                    }
-                ],
-                "groupMaxInstances": 2,
-                "groupMinInstances": 1,
-                "groupScalingEnabled": true
-            }
-        ],
-        "cartridges": [
-            {
-                "type": "esb",
-                "cartridgeMax": 2,
-                "cartridgeMin": 1,
-                "subscribableInfo": {
-                    "alias": "my-esb",
-                    "artifactRepository": {
-                        "privateRepo": true,
-                        "repoPassword": "password",
-                        "repoUrl": "http://xxx:10080/git/default.git",
-                        "repoUsername": "user"
-                    },
-                    "autoscalingPolicy": "autoscaling-policy-1",
-                    "deploymentPolicy": "deployment-policy-1"
-                }
-            }
-        ],
-        "dependencies": {
-            "scalingDependents": [
-                {
-                    "aliases": [
-                        "group.my-appgroup, cartridge.my-esb"
-                    ]
-                }
-            ],
-            "startupOrders": [
-                {
-                    "aliases": [
-                        "group.my-dbgroup3333",
-                        "group.my-appgroup5555"
-                    ]
-                },
-                {
-                    "aliases": [
-                        "group.my-dbgroup555",
-                        "cartridge.my-esb66666"
-                    ]
-                }
-            ],
-            "terminationBehaviour": "terminate-none"
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/autoscaling-policies/autoscaling-policy-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/autoscaling-policies/autoscaling-policy-1.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/autoscaling-policies/autoscaling-policy-1.json
deleted file mode 100644
index a95d4fc..0000000
--- a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/autoscaling-policies/autoscaling-policy-1.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-1",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 20
-        },
-        "memoryConsumption": {
-            "threshold": 70
-        },
-        "loadAverage": {
-            "threshold": 70
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/autoscaling-policies/autoscaling-policy-application-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/autoscaling-policies/autoscaling-policy-application-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/autoscaling-policies/autoscaling-policy-application-startup-order-test.json
new file mode 100644
index 0000000..365e135
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/autoscaling-policies/autoscaling-policy-application-startup-order-test.json
@@ -0,0 +1,14 @@
+{
+    "id": "autoscaling-policy-application-startup-order-test",
+    "loadThresholds": {
+        "requestsInFlight": {
+            "threshold": 20
+        },
+        "memoryConsumption": {
+            "threshold": 70
+        },
+        "loadAverage": {
+            "threshold": 70
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges-groups/app-group-application-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges-groups/app-group-application-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges-groups/app-group-application-startup-order-test.json
new file mode 100644
index 0000000..34d43fb
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges-groups/app-group-application-startup-order-test.json
@@ -0,0 +1,20 @@
+{
+    "name": "app-group-application-startup-order-test",
+    "cartridges": [
+        "tomcat-application-startup-order-test",
+        "php-application-startup-order-test"
+    ],
+    "dependencies": {
+        "terminationBehaviour": "terminate-all",
+        "startupOrders": [
+            {
+                "aliases": [
+                    "cartridge.my-php-application-startup-order-test",
+                    "cartridge.my-tomcat-application-startup-order-test"
+                ]
+            }
+        ]
+    },
+    "groupScalingEnabled": true
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges-groups/app-group.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges-groups/app-group.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges-groups/app-group.json
deleted file mode 100644
index 9644bc3..0000000
--- a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges-groups/app-group.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-    "name": "app-group",
-    "cartridges": [
-        "tomcat",
-        "php"
-    ],
-    "dependencies": {
-        "terminationBehaviour": "terminate-all",
-        "startupOrders": [
-            {
-                "aliases": [
-                    "cartridge.my-php",
-                    "cartridge.my-tomcat"
-                ]
-            }
-        ]
-    },
-    "groupScalingEnabled": true
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges-groups/db-group-application-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges-groups/db-group-application-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges-groups/db-group-application-startup-order-test.json
new file mode 100644
index 0000000..0306313
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges-groups/db-group-application-startup-order-test.json
@@ -0,0 +1,13 @@
+{
+    "name": "db-group-application-startup-order-test",
+    "cartridges": [
+        "mysql-application-startup-order-test",
+        "postgres-application-startup-order-test"
+    ],
+    "dependencies": {
+        "terminationBehaviour": "terminate-all"
+    },
+    "groupScalingEnabled": true
+}
+
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges-groups/db-group.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges-groups/db-group.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges-groups/db-group.json
deleted file mode 100644
index 1ca2cd1..0000000
--- a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges-groups/db-group.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-    "name": "db-group",
-    "cartridges": [
-        "mysql",
-        "postgres"
-    ],
-    "dependencies": {
-        "terminationBehaviour": "terminate-all"
-    },
-    "groupScalingEnabled": true
-}
-
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/esb-application-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/esb-application-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/esb-application-startup-order-test.json
new file mode 100644
index 0000000..b82ea11
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/esb-application-startup-order-test.json
@@ -0,0 +1,50 @@
+{
+    "type": "esb-application-startup-order-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "framework",
+    "displayName": "c4",
+    "description": "esb-application-startup-order-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ],
+    "metadataKeys": [
+        "server_ip",
+        "username",
+        "password"
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/esb.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/esb.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/esb.json
deleted file mode 100644
index 88c6348..0000000
--- a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/esb.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-    "type": "esb",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "framework",
-    "displayName": "c4",
-    "description": "mysql Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ],
-    "metadataKeys": [
-        "server_ip",
-        "username",
-        "password"
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/mysql-application-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/mysql-application-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/mysql-application-startup-order-test.json
new file mode 100644
index 0000000..9a1eb94
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/mysql-application-startup-order-test.json
@@ -0,0 +1,50 @@
+{
+    "type": "mysql-application-startup-order-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "data",
+    "displayName": "c4",
+    "description": "mysql-application-startup-order-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ],
+    "metadataKeys": [
+        "server_ip",
+        "username",
+        "password"
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/mysql.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/mysql.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/mysql.json
deleted file mode 100644
index 9fc328d..0000000
--- a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/mysql.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-    "type": "mysql",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c4",
-    "description": "mysql Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ],
-    "metadataKeys": [
-        "server_ip",
-        "username",
-        "password"
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/php-application-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/php-application-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/php-application-startup-order-test.json
new file mode 100644
index 0000000..7b851e0
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/php-application-startup-order-test.json
@@ -0,0 +1,51 @@
+{
+    "type": "php-application-startup-order-test",
+    "provider": "apache",
+    "category": "framework",
+    "host": "php.stratos.org",
+    "displayName": "php-application-startup-order-test",
+    "description": "php-application-startup-order-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-80",
+            "protocol": "http",
+            "port": "8080",
+            "proxyPort": "8280"
+        },
+        {
+            "name": "http-22",
+            "protocol": "tcp",
+            "port": "22",
+            "proxyPort": "8222"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "reka"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/php.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/php.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/php.json
deleted file mode 100644
index 5d53e3a..0000000
--- a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/php.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
-    "type": "php",
-    "provider": "apache",
-    "category": "framework",
-    "host": "php.stratos.org",
-    "displayName": "php",
-    "description": "php Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-80",
-            "protocol": "http",
-            "port": "8080",
-            "proxyPort": "8280"
-        },
-        {
-            "name": "http-22",
-            "protocol": "tcp",
-            "port": "22",
-            "proxyPort": "8222"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "reka"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/9514aef5/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/postgres-application-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/postgres-application-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/postgres-application-startup-order-test.json
new file mode 100644
index 0000000..10a9ab2
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-startup-order-test/cartridges/mock/postgres-application-startup-order-test.json
@@ -0,0 +1,50 @@
+{
+    "type": "postgres-application-startup-order-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "data",
+    "displayName": "c4",
+    "description": "postgres-application-startup-order-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ],
+    "metadataKeys": [
+        "server_ip",
+        "username",
+        "password"
+    ]
+}