@SetEnvironment(executionEnvironments = {ExecutionEnvironment.STANDALONE})
  @BeforeClass(alwaysRun = true)
  public void setEnvironment() throws Exception {
    super.init();

    //        if (FrameworkFactory.getFrameworkProperties(
    //                ProductConstant.ESB_SERVER_NAME).getEnvironmentSettings().is_builderEnabled())
    // {
    axis2Server = new SampleAxis2Server("test_axis2_server_9001.xml");
    axis2Server.start();
    axis2Server.deployService(MTOM_SERVICE);
    loadESBConfigurationFromClasspath(relativeFilePath);

    //        } else {
    //            builder = new EnvironmentBuilder().as(ProductConstant.ADMIN_USER_ID);
    //            appServer = builder.build().getAs();
    //            int deploymentDelay =
    // builder.getFrameworkSettings().getEnvironmentVariables().getDeploymentDelay();
    //            String serviceFilePath =
    // ProductConstant.getResourceLocations(ProductConstant.AXIS2_SERVER_NAME)
    //                                     + File.separator + "aar" + File.separator + MTOM_SERVICE
    // + ".aar";
    //            ServiceDeploymentUtil deployer = new ServiceDeploymentUtil();
    //            deployer.deployArrService(appServer.getBackEndUrl(), appServer.getSessionCookie()
    //                    , MTOM_SERVICE, serviceFilePath, deploymentDelay);
    //            updateESBConfiguration(replaceEndpoints(relativeFilePath, MTOM_SERVICE, "9001"));
    //        }

  }
  @AfterClass(alwaysRun = true)
  public void close() throws Exception {
    if (axis2Server != null && axis2Server.isStarted()) {
      axis2Server.stop();

      //        } else {
      //            ServiceDeploymentUtil deployer = new ServiceDeploymentUtil();
      //            deployer.unDeployArrService(appServer.getBackEndUrl(),
      // appServer.getSessionCookie()
      //                    , MTOM_SERVICE, 30000);
    }
    super.cleanup();
  }
  @AfterClass(groups = "wso2.esb")
  public void close() throws Exception {
    // resourceAdminServiceClient.deleteResource("/_system/config/test_ep_config");
    axis2Server1.stop();

    endPointAdminClient = null;
    super.cleanup();
  }
  @BeforeClass(alwaysRun = true)
  public void init() throws Exception {

    axis2Server1 = new SampleAxis2Server("test_axis2_server_9009.xml");
    axis2Server1.start();
    axis2Server1.deployService(ESBTestConstant.STUDENT_REST_SERVICE);

    super.init();
    loadESBConfigurationFromClasspath(
        File.separator
            + "artifacts"
            + File.separator
            + "ESB"
            + File.separator
            + "endpoint"
            + File.separator
            + "httpEndpointConfig"
            + File.separator
            + "synapse.xml");

    endPointAdminClient =
        new EndPointAdminClient(context.getContextUrls().getBackEndUrl(), getSessionCookie());
  }