UISelectItems items = new UISelectItems();
items.setValue(selectItems);
pickList = (UIPickList)application.createComponent("org.richfaces.PickList");
pickList.setValueExpression("value", new MockValueExpression(selected) );
pickList.getChildren().add(item1);
pickList.getChildren().add(item2);
pickList.getChildren().add(item3);
pickList.getChildren().add(item4);
pickList.getChildren().add(items);
form.getChildren().add(pickList);
pickList2 = (UIPickList)application.createComponent("org.richfaces.PickList");
pickList2.setValueExpression("value", new MockValueExpression(selectedList) );
pickList2.getChildren().add(item1);
pickList2.getChildren().add(item2);
pickList2.getChildren().add(item3);
pickList2.getChildren().add(item4);
pickList2.getChildren().add(items);