public void testSaveState() throws Exception {
UIForm form = new UIForm();
form.getAttributes().put("foo", "bar");
form.setPrependId(true);
Object state = form.saveState(facesContext);
form = new UIForm();
form.restoreState(facesContext, state);
assertTrue("bar".equals(form.getAttributes().get("foo")));
assertTrue(form.isPrependId());
}