@BeforeClass(groups = "wso2.greg", alwaysRun = true)
  public void initialize() throws Exception {

    super.init(TestUserMode.SUPER_TENANT_ADMIN);
    sessionCookie = new LoginLogoutClient(automationContext).login();
    resourceAdminServiceClient = new ResourceAdminServiceClient(backendURL, sessionCookie);
  }
 @BeforeClass(alwaysRun = true)
 public void initTest() throws Exception {
   super.init(TestUserMode.SUPER_TENANT_ADMIN);
   cookie = getSessionCookie();
   RegistryProviderUtil registryProviderUtil = new RegistryProviderUtil();
   registry = registryProviderUtil.getWSRegistry(automationContext);
 }
  @BeforeClass(groups = "wso2.greg", alwaysRun = true)
  public void initialize() throws Exception {
    super.init(TestUserMode.SUPER_TENANT_ADMIN);
    sessionCookie = new LoginLogoutClient(automationContext).login();

    RegistryProviderUtil provider = new RegistryProviderUtil();
    WSRegistryServiceClient wsRegistry = provider.getWSRegistry(automationContext);
    governanceRegistry = provider.getGovernanceRegistry(wsRegistry, automationContext);
  }
 @BeforeClass
 public void init() throws Exception {
   super.init(TestUserMode.SUPER_TENANT_ADMIN);
   String session = getSessionCookie();
   wsRegistry = registryProviderUtil.getWSRegistry(automationContext);
   resourceAdminServiceClient = new ResourceAdminServiceClient(backendURL, session);
   RegistryProviderUtil registryProviderUtil = new RegistryProviderUtil();
   governance = registryProviderUtil.getGovernanceRegistry(wsRegistry, automationContext);
 }
  @BeforeClass(alwaysRun = true)
  public void initialize() throws Exception {

    super.init(TestUserMode.SUPER_TENANT_ADMIN);
    resourceAdminClient = new ResourceAdminServiceClient(getBackendURL(), getSessionCookie());
    relationServiceClient = new RelationAdminServiceClient(getBackendURL(), getSessionCookie());
    listMetaDataServiceClient = new ListMetaDataServiceClient(getBackendURL(), getSessionCookie());
    RegistryProviderUtil registryProviderUtil = new RegistryProviderUtil();
    WSRegistryServiceClient registry = registryProviderUtil.getWSRegistry(automationContext);
    governance = registryProviderUtil.getGovernanceRegistry(registry, automationContext);
  }
  @BeforeClass(groups = "wso2.greg", alwaysRun = true)
  public void initialize() throws Exception {
    super.init(TestUserMode.SUPER_TENANT_USER);
    sessionCookie = new LoginLogoutClient(automationContext).login();
    infoServiceAdminclient =
        new InfoServiceAdminClient(
            automationContext.getContextUrls().getBackEndUrl(), sessionCookie);

    RegistryProviderUtil provider = new RegistryProviderUtil();
    WSRegistryServiceClient wsRegistry = provider.getWSRegistry(automationContext);
    governanceRegistry = provider.getGovernanceRegistry(wsRegistry, automationContext);
    policyManager = new PolicyManager(governanceRegistry);
  }
  //    @BeforeClass
  public void init() throws Exception {
    super.init(TestUserMode.SUPER_TENANT_ADMIN);
    String session = getSessionCookie();

    logViewerClient = new LogViewerClient(backendURL, session);

    lifeCycleManagementClient = new LifeCycleManagementClient(backendURL, session);

    wsRegistryServiceClient = registryProviderUtil.getWSRegistry(automationContext);

    resourceAdminServiceClient = new ResourceAdminServiceClient(backendURL, session);

    lifeCycleAdminServiceClient = new LifeCycleAdminServiceClient(backendURL, session);
  }
  @BeforeClass(alwaysRun = true)
  public void init() throws Exception {

    super.init(TestUserMode.SUPER_TENANT_ADMIN);
    backEndUrl = getBackendURL();
    sessionCookie = getSessionCookie();

    userManagementClient = new UserManagementClient(backEndUrl, sessionCookie);
    infoServiceAdminClient = new InfoServiceAdminClient(backEndUrl, sessionCookie);
    wsRegistryServiceClient = registryProviderUtil.getWSRegistry(automationContext);
    lifeCycleAdminServiceClient = new LifeCycleAdminServiceClient(backEndUrl, sessionCookie);
    lifeCycleManagementClient = new LifeCycleManagementClient(backEndUrl, sessionCookie);
    relationAdminServiceClient = new RelationAdminServiceClient(backEndUrl, sessionCookie);
    resourceAdminServiceClient = new ResourceAdminServiceClient(backEndUrl, sessionCookie);

    RegistryProviderUtil registryProviderUtil = new RegistryProviderUtil();
    governance =
        registryProviderUtil.getGovernanceRegistry(wsRegistryServiceClient, automationContext);
  }
  @BeforeClass(alwaysRun = true)
  public void init() throws Exception {

    super.init(TestUserMode.SUPER_TENANT_USER);
    String sessionCookie = getSessionCookie();
    lifeCycleAdminServiceClient = new LifeCycleAdminServiceClient(backendURL, sessionCookie);
    governanceServiceClient = new GovernanceServiceClient(backendURL, sessionCookie);
    listMetadataServiceClient = new ListMetaDataServiceClient(backendURL, sessionCookie);
    lifeCycleManagementClient = new LifeCycleManagementClient(backendURL, sessionCookie);
    resourceAdminServiceClient = new ResourceAdminServiceClient(backendURL, sessionCookie);
    wsRegistryServiceClient = registryProviderUtil.getWSRegistry(automationContext);
    Registry reg =
        registryProviderUtil.getGovernanceRegistry(
            new RegistryProviderUtil().getWSRegistry(automationContext), automationContext);
    GovernanceUtils.loadGovernanceArtifacts((UserRegistry) reg);
    serviceManager = new ServiceManager(reg);

    String userName = automationContext.getContextTenant().getContextUser().getUserName();
    userName1WithoutDomain = userName.substring(0, userName.indexOf('@'));
  }
  @BeforeClass
  public void initialize() throws Exception {

    super.init(TestUserMode.SUPER_TENANT_ADMIN);
    backEndUrl = getBackendURL();
    sessionCookie = getSessionCookie();
    userName = automationContext.getContextTenant().getContextUser().getUserName();
    if (userName.contains("@"))
      userNameWithoutDomain = userName.substring(0, userName.indexOf('@'));
    else userNameWithoutDomain = userName;

    adminServiceApplicationAdmin = new ApplicationAdminClient(backEndUrl, sessionCookie);
    cAppUploader = new CarbonAppUploaderClient(backEndUrl, sessionCookie);
    //        listMetaDataServiceClient =
    //                new ListMetaDataServiceClient(backEndUrl,
    //                                              sessionCookie);
    logViewerClient = new LogViewerClient(backEndUrl, sessionCookie);
    resourceAdminServiceClient = new ResourceAdminServiceClient(backEndUrl, sessionCookie);
    WSRegistryServiceClient wsRegistry =
        new RegistryProviderUtil().getWSRegistry(automationContext);
    governance = new RegistryProviderUtil().getGovernanceRegistry(wsRegistry, automationContext);
  }
 @BeforeClass(groups = {"wso2.greg"})
 public void initTest() throws Exception {
   super.init(TestUserMode.SUPER_TENANT_ADMIN);
   RegistryProviderUtil registryProviderUtil = new RegistryProviderUtil();
   registry = registryProviderUtil.getWSRegistry(automationContext);
 }
  @BeforeClass(alwaysRun = true)
  public void init() throws Exception {

    super.init(TestUserMode.SUPER_TENANT_ADMIN);
    registry = new RegistryProviderUtil().getRemoteRegistry(automationContext);
  }