Collection<Class<?>> classes = new ArrayList<Class<?>>();
classes.add(ExternalTestScopedBean.class);
addExtension(new ExternalTestScopeExtension());
startContainer(classes);
MockServletContext servletContext = new MockServletContext();
ContextFactory.initApplicationContext(servletContext);
@SuppressWarnings("unchecked")
Bean<ExternalTestScopedBean> bean = (Bean<ExternalTestScopedBean>) getBeanManager().getBeans(ExternalTestScopedBean.class,
new DefaultLiteral()).iterator().next();