@Test(
      groups = "wso2.greg",
      description = "Create new life cycle",
      dependsOnMethods = "testCreateService")
  public void testCreateNewLifeCycle()
      throws LifeCycleManagementServiceExceptionException, IOException, InterruptedException {

    String resourcePath =
        getTestArtifactLocation()
            + "artifacts"
            + File.separator
            + "GREG"
            + File.separator
            + "lifecycle"
            + File.separator
            + "MultiplePromoteDemoteLC.xml";
    String lifeCycleContent = FileManager.readFile(resourcePath);
    lifeCycleManagementClient.addLifeCycle(lifeCycleContent);
    String[] lifeCycles = lifeCycleManagementClient.getLifecycleList();
    boolean lcStatus = false;
    for (String lc : lifeCycles) {
      if (lc.equalsIgnoreCase(LC_NAME)) {
        lcStatus = true;
      }
    }
    assertTrue(lcStatus, "LifeCycle not found");
  }
  /** @throws Exception */
  @AfterClass()
  public void clear() throws Exception {

    String servicePathToDelete = absPath;
    if (wsRegistryServiceClient.resourceExists(servicePathToDelete)) {
      resourceAdminServiceClient.deleteResource(servicePathToDelete);
    }
    //		String schemaPathToDelete =
    // "/_system/governance/trunk/schemas/org/bar/purchasing/purchasing.xsd";
    //		if (wsRegistryServiceClient.resourceExists(schemaPathToDelete)) {
    //			resourceAdminServiceClient.deleteResource(schemaPathToDelete);
    //		}
    //		String wsdlPathToDelete =
    // "/_system/governance/trunk/wsdls/com/foo/IntergalacticService.wsdl";
    //		if (wsRegistryServiceClient.resourceExists(wsdlPathToDelete)) {
    //			resourceAdminServiceClient.deleteResource(wsdlPathToDelete);
    //		}
    lifeCycleManagementClient.deleteLifeCycle(LC_NAME);
    wsRegistryServiceClient = null;
    lifeCycleAdminServiceClient = null;
    lifeCycleManagementClient = null;
    governanceServiceClient = null;
    listMetadataServiceClient = null;
    resourceAdminServiceClient = null;
    userManagementClient = null;
    infoServiceAdminClient = null;
    humanTaskAdminClient = null;
  }