ServiceConfigBuilder.addGBeans(gbeans, cl, j2eeContext, context);
Set beanDatas = context.listGBeans(new ObjectName("*:*"));
assertEquals(1, beanDatas.size());
ObjectName beanName = (ObjectName) beanDatas.iterator().next();
GBeanData data = context.getGBeanInstance(beanName);
FooBarBean fooBarBean = (FooBarBean) data.getAttribute("fooBarBean");
assertNotNull(fooBarBean);
assertEquals("foo", fooBarBean.getFoo());
assertEquals(10, fooBarBean.getBar());
FooBarBean inner = fooBarBean.getBean();
assertNotNull(inner);
assertEquals("foo2", inner.getFoo());
assertEquals(100, inner.getBar());
assertNull(inner.getBean());
} finally {
recursiveDelete(outFile);
}
}