@Override
	public void visit(Entry entry) {
	    if(Boolean.FALSE.equals(entry.getAttribute("allowed")))
	        return;
		if (containsSubmenu(entry))
			addSubmenu(entry);
		else
			addActionItem(entry);
	}
@Test
	public void createsMenuItemWithSelectableAction() {
		menuEntry.addChild(actionEntry);
		when(action.isSelectable()).thenReturn(true);
		new EntryAccessor().setComponent(menuEntry, menu);
		menuActionGroupBuilder.visit(actionEntry);

		JAutoCheckBoxMenuItem item = (JAutoCheckBoxMenuItem)new EntryAccessor().getComponent(actionEntry);

		final AccelerateableAction itemAction = (AccelerateableAction) item.getAction();
		assertThat(itemAction.getOriginalAction(), CoreMatchers.<Action> equalTo(action));
		assertThat(item.getParent(), CoreMatchers.equalTo(menu.getPopupMenu()));
	}