// Path: impl/src/main/java/org/jboss/arquillian/container/weld/embedded/mock/Ejbs.java
// public static Collection<EjbDescriptor<?>> createEjbDescriptors(Iterable<Class<?>> classes) {
//     // EJB API dependency is optional
//     if (!Utils.isClassAccessible("jakarta.ejb.Singleton", Ejbs.class.getClassLoader())) {
//         return Collections.emptySet();
//     }
//     List<EjbDescriptor<?>> ejbs = new ArrayList<EjbDescriptor<?>>();
//     for (Class<?> ejbClass : findEjbs(classes)) {
//         ejbs.add(MockEjbDescriptor.of(ejbClass));
//     }
//     return ejbs;
// }


import static java.util.Arrays.asList;
import static org.jboss.arquillian.container.weld.embedded.mock.Ejbs.createEjbDescriptors;
import static org.jboss.weld.bootstrap.spi.BeansXml.EMPTY_BEANS_XML;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import org.jboss.weld.bootstrap.api.Environment;
import org.jboss.weld.bootstrap.api.Environments;
import org.jboss.weld.bootstrap.api.ServiceRegistry;
import org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry;
import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
import org.jboss.weld.bootstrap.spi.BeansXml;
import org.jboss.weld.ejb.spi.EjbDescriptor;
import org.jboss.weld.injection.spi.EjbInjectionServices;
import org.jboss.weld.injection.spi.JpaInjectionServices;
import org.jboss.weld.injection.spi.ResourceInjectionServices;
    }

    public BeanDeploymentArchiveImpl(Iterable<Class<?>> classes, Environment environment) {
        this("test", EMPTY_BEANS_XML, classes, environment);
    }

    public BeanDeploymentArchiveImpl(String id, Environment environment, Class<?>... classes) {
        this(id, EMPTY_BEANS_XML, asList(classes), environment);
    }

    public BeanDeploymentArchiveImpl(String id, Class<?>... classes) {
        this(id, EMPTY_BEANS_XML, asList(classes), Environments.SE);
    }

    public BeanDeploymentArchiveImpl(String id, BeansXml beansXml, Environment environment, Class<?>... classes) {
        this(id, beansXml, asList(classes), environment);
    }

    public BeanDeploymentArchiveImpl(String id, BeansXml beansXml, Class<?>... classes) {
        this(id, beansXml, asList(classes),  Environments.SE);
    }

    public BeanDeploymentArchiveImpl(String id, BeansXml beansXml, Iterable<Class<?>> beanClasses, Environment environment) {
        this.services = new SimpleServiceRegistry();
        this.bdas = new HashSet<BeanDeploymentArchive>();
        this.beanClasses = new ArrayList<String>();
        for (Class<?> clazz : beanClasses) {
            this.beanClasses.add(clazz.getName());
        }
        this.beansXml = beansXml;
// Path: impl/src/main/java/org/jboss/arquillian/container/weld/embedded/mock/Ejbs.java
// public static Collection<EjbDescriptor<?>> createEjbDescriptors(Iterable<Class<?>> classes) {
//     // EJB API dependency is optional
//     if (!Utils.isClassAccessible("jakarta.ejb.Singleton", Ejbs.class.getClassLoader())) {
//         return Collections.emptySet();
//     }
//     List<EjbDescriptor<?>> ejbs = new ArrayList<EjbDescriptor<?>>();
//     for (Class<?> ejbClass : findEjbs(classes)) {
//         ejbs.add(MockEjbDescriptor.of(ejbClass));
//     }
//     return ejbs;
// }


// Path: impl/src/main/java/org/jboss/arquillian/container/weld/embedded/mock/BeanDeploymentArchiveImpl.java
import static java.util.Arrays.asList;
import static org.jboss.arquillian.container.weld.embedded.mock.Ejbs.createEjbDescriptors;
import static org.jboss.weld.bootstrap.spi.BeansXml.EMPTY_BEANS_XML;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import org.jboss.weld.bootstrap.api.Environment;
import org.jboss.weld.bootstrap.api.Environments;
import org.jboss.weld.bootstrap.api.ServiceRegistry;
import org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry;
import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
import org.jboss.weld.bootstrap.spi.BeansXml;
import org.jboss.weld.ejb.spi.EjbDescriptor;
import org.jboss.weld.injection.spi.EjbInjectionServices;
import org.jboss.weld.injection.spi.JpaInjectionServices;
import org.jboss.weld.injection.spi.ResourceInjectionServices;

    }

    public BeanDeploymentArchiveImpl(Iterable<Class<?>> classes, Environment environment) {
        this("test", EMPTY_BEANS_XML, classes, environment);
    }

    public BeanDeploymentArchiveImpl(String id, Environment environment, Class<?>... classes) {
        this(id, EMPTY_BEANS_XML, asList(classes), environment);
    }

    public BeanDeploymentArchiveImpl(String id, Class<?>... classes) {
        this(id, EMPTY_BEANS_XML, asList(classes), Environments.SE);
    }

    public BeanDeploymentArchiveImpl(String id, BeansXml beansXml, Environment environment, Class<?>... classes) {
        this(id, beansXml, asList(classes), environment);
    }

    public BeanDeploymentArchiveImpl(String id, BeansXml beansXml, Class<?>... classes) {
        this(id, beansXml, asList(classes),  Environments.SE);
    }

    public BeanDeploymentArchiveImpl(String id, BeansXml beansXml, Iterable<Class<?>> beanClasses, Environment environment) {
        this.services = new SimpleServiceRegistry();
        this.bdas = new HashSet<BeanDeploymentArchive>();
        this.beanClasses = new ArrayList<String>();
        for (Class<?> clazz : beanClasses) {
            this.beanClasses.add(clazz.getName());
        }
        this.beansXml = beansXml;
        this.ejbs = createEjbDescriptors(beanClasses);