* description = "WELD-258"
*/
@Test
public void testEventsSentOnceOnly() {
// Create the BDA in which we will deploy Observer1 and Foo. This is equivalent to a war or ejb jar
final BeanDeploymentArchiveImpl bda1 = new BeanDeploymentArchiveImpl("1", CountingObserver1.class, Foo.class);
// Create the BDA to return from loadBeanDeploymentArchive for Observer2, this is probably a library, though could be another war or ejb jar
// bda2 is accessible from bda1, but isn't added to it's accessibility graph by default. This similar to an archive which doesn't contain a beans.xml but does contain an extension
final BeanDeploymentArchive bda2 = new BeanDeploymentArchiveImpl("2", CountingObserver2.class);
// Create a deployment, that we can use to mirror the structure of one Extension inside a BDA, and one outside
Deployment deployment = new AbstractDeployment(bda1, new Observer1(), new Observer2(), new CountingObserver1(), new CountingObserver2()) {
public BeanDeploymentArchive loadBeanDeploymentArchive(Class<?> beanClass) {