@Test(description = TEST_DESCRIPTION) public void testAppPropertyRetrieval() throws Exception { HttpResponse response = appmPublisherRestClient.webAppCreate(appName, context, appVersion, trackingCode); JSONObject responseData = new JSONObject(response.getData()); String uuid = responseData.getString(AppmTestConstants.ID); String appType = AppmTestConstants.WEB_APP; appmPublisherRestClient.publishWebApp(uuid); HttpResponse appPropertyResponse = appmPublisherRestClient.getWebAppProperty(uuid); JSONObject jsonObject = new JSONObject(appPropertyResponse.getData()); // Check App Id String appId = (String) jsonObject.get(AppmTestConstants.ID); assertTrue((appId.equals(uuid) == true), "Unable to Retrieve application id."); // Check App Type String type = (String) jsonObject.get(AppmTestConstants.TYPE); assertTrue((type.equals(appType) == true), "Unable to Retrieve application type."); // Check lifecycleState String lifecycleState = (String) jsonObject.get(AppmTestConstants.LIFE_CYCLE_STATE); assertTrue( (lifecycleState.equalsIgnoreCase(AppmTestConstants.PUBLISHED) == true), "Unable to Retrieve application life cycle."); // Check Path attribute String appPropertyString = userName + "/" + appName + "/" + appVersion + "/" + appType; String path = (String) jsonObject.get("path"); assertTrue(path.endsWith(appPropertyString), "Unable to Retrieve application path."); }