/**
   * Creates the test suite, using the {@link Validator}s.
   *
   * @return Test suite.
   * @throws Exception If anything goes wrong.
   */
  public static Test suite() throws Exception {
    CargoTestSuite suite =
        new CargoTestSuite("Tests that run on containers supporting OSGi deployments");

    // We exclude JBoss 7.2.x, JBoss 7.3.x, JBoss 7.4.x, JBoss 7.5.x, WildFly 8.x and
    // WildFly 9.x as the default standalone configuration XML for these servers has OSGi
    // support disabled
    Set<String> excludedContainerIds = new TreeSet<String>();
    excludedContainerIds.add("jboss72x");
    excludedContainerIds.add("jboss73x");
    excludedContainerIds.add("jboss74x");
    excludedContainerIds.add("jboss75x");
    excludedContainerIds.add("wildfly8x");
    excludedContainerIds.add("wildfly9x");
    excludedContainerIds.add("wildfly10x");

    suite.addTestSuite(
        BundleCapabilityContainerTest.class,
        new Validator[] {
          new IsLocalContainerValidator(),
          new HasStandaloneConfigurationValidator(),
          new HasBundleSupportValidator()
        },
        excludedContainerIds);
    return suite;
  }
  /**
   * Creates the test suite, using the {@link Validator}s.
   *
   * @return Test suite.
   * @throws Exception If anything goes wrong.
   */
  public static Test suite() throws Exception {
    CargoTestSuite suite =
        new CargoTestSuite(
            "Tests that run on local containers supporting XADataSource "
                + "configured DataSources and WAR deployments");

    // The WebLogic WSLT deployer cannot deploy XA datasources with this method
    Set<String> excludedContainerIds = new TreeSet<String>();
    excludedContainerIds.add("weblogic121x");
    excludedContainerIds.add("weblogic122x");

    suite.addTestSuite(
        XATransactionDataSourceOnStandaloneConfigurationTest.class,
        new Validator[] {
          new IsInstalledLocalContainerValidator(),
          new HasStandaloneConfigurationValidator(),
          new HasWarSupportValidator(),
          new HasDataSourceSupportValidator(ConfigurationType.STANDALONE),
          new HasXASupportValidator(ConfigurationType.STANDALONE)
        },
        excludedContainerIds);
    return suite;
  }