public void testSet() throws Exception {
FacesContext facesContext = getFacesContext();
System.out.println("Testing setValue() with model bean in session ");
TestBean testBean = new TestBean();
InnerBean inner = new InnerBean();
Inner2Bean innerInner = new Inner2Bean();
Object result = null;
getFacesContext().getExternalContext().getSessionMap().put("TestBean",
testBean);
boolean exceptionThrown = false;
System.setProperty(TestBean.PROP, TestBean.FALSE);
valueBinding = this.create("TestBean.one");
valueBinding.setValue(getFacesContext(), "one");
assertTrue(System.getProperty(TestBean.PROP).equals(TestBean.TRUE));
InnerBean newInner = new InnerBean();
valueBinding = this.create("TestBean.inner");
valueBinding.setValue(getFacesContext(), newInner);
result = valueBinding.getValue(getFacesContext());
assertTrue(result == newInner);