Collection<Class<?>> classes = new ArrayList<Class<?>>();
classes.add(BookShop.class);
classes.add(PrimitiveProducer.class);
addExtension(new MyExtension());
startContainer(classes);
MockServletContext servletContext = new MockServletContext();
ContextFactory.initApplicationContext(servletContext);
Bean<MyExtension> extension = (Bean<MyExtension>) getBeanManager().getBeans(MyExtension.class, new DefaultLiteral()).iterator().next();
MyExtension ext = (MyExtension) getBeanManager().getReference(extension, MyExtension.class, getBeanManager().createCreationalContext(extension));
System.out.println(ext.toString());
Assert.assertNotNull(MyExtension.processAnnotatedTypeEvent);
Assert.assertNotNull(MyExtension.processBean);
Assert.assertNotNull(MyExtension.processObserverMethod);
Assert.assertNotNull(MyExtension.lastAfterBeanDiscovery);