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