private String createWebApp(String appPrefix) throws Exception {
   PolicyGroup defaultPolicyGroup = WebAppUtil.createDefaultPolicy();
   HttpResponse response = appmPublisherRestClient.addPolicyGroup(defaultPolicyGroup);
   String policyId = WebAppUtil.getPolicyId(response);
   List<WebAppResource> webAppResources = WebAppUtil.createDefaultResources(policyId);
   WebApp webApp =
       WebAppUtil.createBasicWebApp(
           appCreatorUserName,
           appName + appPrefix,
           context + appPrefix,
           appVersion,
           "http://wso2.com/",
           webAppResources);
   appmPublisherRestClient.createWebApp(webApp);
   return webApp.getAppId();
 }
 private String createWebAppAndSubmitForReview(String appPrefix) throws Exception {
   PolicyGroup defaultPolicyGroup = WebAppUtil.createDefaultPolicy();
   HttpResponse response = appmPublisherRestClient.addPolicyGroup(defaultPolicyGroup);
   String policyId = WebAppUtil.getPolicyId(response);
   List<WebAppResource> webAppResources = WebAppUtil.createDefaultResources(policyId);
   WebApp webApp =
       WebAppUtil.createBasicWebApp(
           appCreatorUserName,
           appName + appPrefix,
           context + appPrefix,
           appVersion,
           "http://wso2.com/",
           webAppResources);
   appmPublisherRestClient.createWebApp(webApp);
   String appId = webApp.getAppId();
   appmPublisherRestClient.changeState(appId, AppmTestConstants.LifeCycleStatus.SUBMIT_FOR_REVIEW);
   return appId;
 }