sessionBean.setName("sessionBean");
sessionBean.setScope("#{scopeBean.scope}");
ManagedProperty anotherBeanProperty = new ManagedProperty();
anotherBeanProperty.setPropertyName("anotherBean");
anotherBeanProperty.setValue("#{requestBean}");
sessionBean.addProperty(anotherBeanProperty);
runtimeConfig.addManagedBean("sessionBean", sessionBean);
// create requestBean
ManagedBean requestBean = new ManagedBean();
requestBean.setBeanClass(TestBean.class.getName());