if (isScanAnnotations())
{
facesConfig = super.getAnnotationsFacesConfig(ectx, metadataComplete);
}
ManagedBeans annoManagedBeans = testCase.getClass().getAnnotation(ManagedBeans.class);
if (annoManagedBeans != null)
{
if (facesConfig == null)
{
facesConfig = new org.apache.myfaces.config.impl.digester.elements.FacesConfigImpl();
}
for (PageBean annoPageBean : annoManagedBeans.values())
{
org.apache.myfaces.config.impl.digester.elements.ManagedBeanImpl bean = new
org.apache.myfaces.config.impl.digester.elements.ManagedBeanImpl();
bean.setBeanClass(annoPageBean.clazz().getName());
bean.setName(annoPageBean.name() == null ? annoPageBean.clazz().getName() : annoPageBean.name());