}
public void testListMenuItemsDTOManyItems() throws Exception {
Map<String, List<MenuItemDescription>> items = new HashMap<String, List<MenuItemDescription>>();
List<MenuItemDescription> itemsOfGroup1 = new ArrayList<MenuItemDescription>();
MenuItemDescription menuItem1 = new MenuItemDescription();
List<String> allowedEvents = new ArrayList<String>();
allowedEvents.add("onclick");
allowedEvents.add("onblur");
allowedEvents.add("onfocus");
List<FormEffectDescription> effects = new ArrayList<FormEffectDescription>();
FormEffectDescription effect1 = new FormEffectDescription();
effect1.setClassName("org.jbpm.formbuilder.client.effect.ResizeEffect");
effects.add(effect1);
FormEffectDescription effect2 = new FormEffectDescription();
effect2.setClassName("org.jbpm.formbuilder.client.effect.RemoveEffect");
effects.add(effect2);
menuItem1.setAllowedEvents(allowedEvents);
menuItem1.setClassName("org.jbpm.formbuilder.client.menu.items.ClientScriptMenuItem");
menuItem1.setEffects(effects);
MenuItemDescription menuItem2 = new MenuItemDescription();
menuItem2.setClassName("org.jbpm.formbuilder.client.menu.items.TableLayoutMenuItem");
menuItem2.setAllowedEvents(allowedEvents);
itemsOfGroup1.add(menuItem1);
itemsOfGroup1.add(menuItem2);
List<MenuItemDescription> itemsOfGroup2 = new ArrayList<MenuItemDescription>();
MenuItemDescription menuItem3 = new MenuItemDescription();
menuItem3.setClassName("org.jbpm.formbuilder.client.menu.items.TableLayoutMenuItem");
menuItem3.setEffects(effects);
MenuItemDescription menuItem4 = new MenuItemDescription();
MenuItemDescription menuItem5 = new MenuItemDescription();
menuItem5.setClassName("org.jbpm.formbuilder.client.menu.items.HeaderMenuItem");
menuItem5.setEffects(effects);
menuItem5.setAllowedEvents(allowedEvents);
menuItem5.setItemRepresentation(RESTAbstractTest.createMockForm("", "param2").getFormItems().iterator().next());
menuItem5.setName("some name");
itemsOfGroup2.add(menuItem3);
itemsOfGroup2.add(menuItem4);
itemsOfGroup2.add(menuItem5);
items.put("oneGroup", itemsOfGroup1);
items.put("twoGroups", itemsOfGroup2);