public void testGetSelectItem() {
UISelectOne selectOne = new UISelectOne();
selectOne.getChildren().add(new UISelectItemStub("value1", "label1", "description1", false, false, false));
selectOne.getChildren().add(new UISelectItemStub("value2", "label2", "description2", false, true, true));
UISelectItem item = new UISelectItem();
item.setValue(new SelectItem("value3", "label3", "description3", true, true, true));
selectOne.getChildren().add(item);
// non select item at end
UIParameter param = new UIParameter();
param.setName("param");
param.setValue("paramValue");
selectOne.getChildren().add(param);
checkSelectItems(asList(SelectUtils.getSelectItems(facesContext, selectOne)));
// non select item in middle
selectOne = new UISelectOne();
selectOne.getChildren().add(new UISelectItemStub("value1", "label1", "description1", false, false, false));
selectOne.getChildren().add(param);
selectOne.getChildren().add(new UISelectItemStub("value2", "label2", "description2", false, true, true));
checkTwoSelectItems(asList(SelectUtils.getSelectItems(facesContext, selectOne)));
// non select item as value cause IllegalArgumentException
item = new UISelectItem();
item.setValue(new UISelectItem());
selectOne.getChildren().add(item);
try {
SelectUtils.getSelectItems(facesContext, selectOne);
} catch (Exception e) {
if (!(e instanceof IllegalArgumentException)) {