private void uploadResourcesToConfigRegistry() throws Exception {

    ResourceAdminServiceClient resourceAdminServiceStub =
        new ResourceAdminServiceClient(
            context.getContextUrls().getBackEndUrl(), getSessionCookie());

    resourceAdminServiceStub.deleteResource("/_system/config/sequence");
    resourceAdminServiceStub.addCollection(
        "/_system/config/", "sequence", "", "Contains test sequence files");

    resourceAdminServiceStub.addResource(
        "/_system/config/sequence/out_sequence.xml",
        "application/vnd.wso2.sequence",
        "application/vnd.wso2.sequence files",
        new DataHandler(
            new URL(
                "file:///"
                    + getESBResourceLocation()
                    + "/proxyconfig/proxy/utils/out_sequence.xml")));

    Thread.sleep(2000);

    resourceAdminServiceStub.addResource(
        "/_system/config/sequence/fault_sequence.xml",
        "application/vnd.wso2.sequence",
        "application/vnd.wso2.sequence files",
        new DataHandler(
            new URL(
                "file:///"
                    + getESBResourceLocation()
                    + "/proxyconfig/proxy/utils/fault_sequence.xml")));

    Thread.sleep(1000);
  }
  @AfterClass(alwaysRun = true)
  public void destroy() throws Exception {
    ResourceAdminServiceClient resourceAdmin =
        new ResourceAdminServiceClient(contextUrls.getBackEndUrl(), sessionCookie);
    try {
      resourceAdmin.deleteResource("/_system/config/securityTransform");
    } finally {

      super.cleanup();
    }
  }
  private void clearUploadedResource()
      throws InterruptedException, ResourceAdminServiceExceptionException, RemoteException,
          XPathExpressionException {

    ResourceAdminServiceClient resourceAdminServiceStub =
        new ResourceAdminServiceClient(
            context.getContextUrls().getBackEndUrl(), getSessionCookie());

    resourceAdminServiceStub.deleteResource("/_system/config/sequence");

    Thread.sleep(1000);
  }
 @AfterClass(alwaysRun = true)
 public void close() throws Exception {
   try {
     if (isProxyDeployed) {
       deleteProxyService("SmooksProxy");
     }
     resourceAdminServiceClient.deleteResource("/_system/config/smooks_config.xml");
   } finally {
     cleanup();
     Thread.sleep(3000);
     serverConfigurationManager.restoreToLastConfiguration();
     resourceAdminServiceClient = null;
     serverConfigurationManager = null;
   }
 }