public void testCheckSecurityScenario15CSVDataService() throws Exception {
    ServiceManagement instServiceManagement = new ServiceManagement(browser);

    String serviceName = "CSVDataService";
    String nameSpace = "http://ws.wso2.org/dataservice";
    String soapAction = "urn:getAllCustomer";
    String operation = "getAllCustomer";

    instServiceManagement.Login();
    instServiceManagement.enableSecurityScenario(serviceName, "scenario14");
    OMElement result =
        new SecurityClient()
            .runSecurityClient("scenario14", serviceName, nameSpace, soapAction, operation, "s");
    System.out.println(result);

    String csvExpectedResult = "Boston";
    String output =
        result
            .getFirstElement()
            .getAttributeValue(new QName("http://ws.wso2.org/dataservice", "address"));
    assertEquals(csvExpectedResult, output);

    Thread.sleep(1000);
    instServiceManagement.disableSecurity(serviceName);
  }
  public void testServiceActivationCSVDataService() throws Exception {
    ServiceManagement instServiceManagement = new ServiceManagement(browser);

    instServiceManagement.Login();
    instServiceManagement.serviceActivation("CSVDataService", "Deactivate");
    instServiceManagement.serviceActivation("CSVDataService", "Activate");
  }
  public void testMTOMCSVDataServiceCSVDataService() throws Exception {
    ServiceManagement insServiceManagement = new ServiceManagement(browser);

    insServiceManagement.Login();
    //        insServiceManagement.changeOperationalMTOM("CSVDataService", "getAllCustomer",
    // "True");
    //        Thread.sleep(1000);
    //        insServiceManagement.changeOperationalMTOM("CSVDataService", "getAllCustomer",
    // "Optional");
    //        Thread.sleep(1000);
    //        insServiceManagement.changeOperationalMTOM("CSVDataService", "getAllCustomer",
    // "False");
    //       Thread.sleep(1000);
    //        insServiceManagement.changeServiceGroupMTOM("CSVDataService", "True");
    //        Thread.sleep(1000);
    //        insServiceManagement.changeServiceGroupMTOM("CSVDataService", "Optional");
    //        Thread.sleep(1000);
    //        insServiceManagement.changeServiceGroupMTOM("CSVDataService", "False");
    //        Thread.sleep(1000);
    insServiceManagement.changeServiceMTOM("CSVDataService", "True");
    Thread.sleep(1000);
    insServiceManagement.changeServiceMTOM("CSVDataService", "Optional");
    Thread.sleep(1000);
    insServiceManagement.changeServiceMTOM("CSVDataService", "False");
  }
  public void testOperationalFlowsCSVDataService() throws Exception {
    ServiceManagement instServiceManagement = new ServiceManagement(browser);

    instServiceManagement.Login();
    instServiceManagement.accessServiceDashboard("CSVDataService");
    instServiceManagement.openOperationDashboard("CSVDataService", "getAllCustomer");
    instServiceManagement.checkParamFlows();
  }
  public void testAddServiceGroupModuleCSVDataService() throws Exception {
    ServiceManagement instServiceManagement = new ServiceManagement(browser);

    instServiceManagement.Login();
    instServiceManagement.engageServiceGroupModule("CSVDataService", "sandesha2-" + moduleVersion);
    instServiceManagement.disengageServiceGroupModule(
        "CSVDataService", "sandesha2-" + moduleVersion);
  }
  public void testDeleteKeystoreCSVDataService() throws Exception {
    ServiceManagement instServiceManagement = new ServiceManagement(browser);
    KeyStoreManagement instKeyStoreManagement = new KeyStoreManagement(browser);

    instServiceManagement.Login();
    instServiceManagement.disableSecurity("CSVDataService");
    instKeyStoreManagement.deleteKeyStore("qaserver.jks");
  }
  public void testRemoveServicesCSVDataService() throws Exception {
    SeleniumTestBase seleniumTestBase = new SeleniumTestBase(browser);
    ServiceManagement instServiceManagement = new ServiceManagement(browser);

    instServiceManagement.Login();
    seleniumTestBase.deleteService("CSVDataService");
    seleniumTestBase.logOutUI();
  }
  public void testServiceGroupParameterCSVDataService() throws Exception {
    ServiceManagement instServiceManagement = new ServiceManagement(browser);

    instServiceManagement.Login();
    instServiceManagement.addServiceGroupParameter("CSVDataService", "NewParam1");
    Thread.sleep(1000);
    instServiceManagement.deleteServiceGroupParameter("CSVDataService", "NewParam1");
  }
  public void testOperationalModuleMgtCSVDataService() throws Exception {
    ServiceManagement instServiceManagement = new ServiceManagement(browser);

    instServiceManagement.Login();
    instServiceManagement.engageOperationModule(
        "CSVDataService", "getAllCustomer", "savan-SNAPSHOT");
    instServiceManagement.disengageOperationModule(
        "CSVDataService", "getAllCustomer", "savan-SNAPSHOT");
  }
  public void testServiceParameterCSVDataService() throws Exception {
    SeleniumTestBase mySeleniumTestBase = new SeleniumTestBase(browser);
    ServiceManagement instServiceManagement = new ServiceManagement(browser);

    instServiceManagement.Login();
    instServiceManagement.accessServiceDashboard("CSVDataService");
    mySeleniumTestBase.addNewParameter("testparam");
    instServiceManagement.accessServiceDashboard("CSVDataService");
    mySeleniumTestBase.deleteParameter("testparam");
  }
  public void testHttpsSecurityScenario() throws Exception {
    ServiceManagement instServiceManagement = new ServiceManagement(browser);

    instServiceManagement.Login();
    instServiceManagement.enableSecurityScenario("Axis2Service", "scenario1");
    browser.click("//table[@id='serviceOperationsTable']/tbody/tr[3]/td[2]/a");
    browser.waitForPageToLoad("30000");
    assertTrue(browser.isTextPresent("All enabled transport listeners are already added "));
    browser.click("//input[@value='Finish']");
    browser.waitForPageToLoad("30000");
    instServiceManagement.disableSecurity("Axis2Service");
  }
  public void testReliableMessagingCSVDataService() throws Exception {
    ServiceManagement instServiceManagement = new ServiceManagement(browser);

    String serviceName = "CSVDataService";
    String nameSpace = "http://ws.wso2.org/dataservice";
    String soapAction = "urn:getAllCustomer";
    String operation = "getAllCustomer";

    instServiceManagement.Login();
    instServiceManagement.enableRM("CSVDataService");
    instServiceManagement.rmInvocations(serviceName, soapAction, nameSpace, operation, "s");
    instServiceManagement.disableRM("CSVDataService");
  }
  public void testCheckThrottlingCSVDataService() throws Exception {
    ServiceManagement instServiceManagement = new ServiceManagement(browser);

    instServiceManagement.Login();
    instServiceManagement.openServiceDashboard("CSVDataService", "data_service");
    String serviceepr =
        "http://"
            + property.getProperty("host.name")
            + ":"
            + property.getProperty("http.port")
            + property.getProperty("context.root")
            + "/services/"
            + "CSVDataService";
    instServiceManagement.checkThrottling(
        serviceepr, "getAllCustomer", "urn:getAllCustomer", "http://ws.wso2.org/dataservice", "s");
  }
  public void testAddKeyStoreCSVDataService() throws Exception {
    ServiceManagement instServiceManagement = new ServiceManagement(browser);
    KeyStoreManagement instKeyStoreManagement = new KeyStoreManagement(browser);

    File path =
        new File(
            ".."
                + File.separator
                + "commons"
                + File.separator
                + "lib"
                + File.separator
                + "qaserver.jks");

    instServiceManagement.Login();
    instKeyStoreManagement.AddKeystore(path.getCanonicalPath(), "qaserver");
  }
  public void testServiceModuleMgtCSVDataService() throws Exception {
    ServiceManagement instServiceManagement = new ServiceManagement(browser);

    instServiceManagement.Login();
    instServiceManagement.accessServiceDashboard("CSVDataService");
    instServiceManagement.engageServiceModule(
        "CSVDataService", "CSVDataService", "sandesha2-" + moduleVersion);
    instServiceManagement.accessServiceDashboard("CSVDataService");
    instServiceManagement.disengageServiceModule("CSVDataService", "sandesha2-" + moduleVersion);
  }
  public void testOperationalAddParametersCSVDataService() throws Exception {
    SeleniumTestBase InstSeleniumTestBase = new SeleniumTestBase(browser);
    ServiceManagement instServiceManagement = new ServiceManagement(browser);

    String operationName = "getAllCustomer";

    instServiceManagement.Login();
    instServiceManagement.accessServiceDashboard("CSVDataService");
    instServiceManagement.openOperationDashboard("CSVDataService", operationName);
    InstSeleniumTestBase.addNewParameter("testparam");
    instServiceManagement.accessServiceDashboard("CSVDataService");
    instServiceManagement.openOperationDashboard("CSVDataService", operationName);
    InstSeleniumTestBase.deleteOperationalParameter("testparam");
  }
  public void testTransportCSVDataService() throws Exception {
    ServiceManagement instServiceManagement = new ServiceManagement(browser);

    instServiceManagement.Login();
    instServiceManagement.checkTransport("CSVDataService");
  }