@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 createsSubmenuWithAction() {

		Entry parentMenuEntry = new Entry();
		final JMenu parentMenu = new JMenu();
		new EntryAccessor().setComponent(parentMenuEntry, parentMenu);
		parentMenuEntry.addChild(menuEntry);
		menuEntry.addChild(actionEntry);
		new EntryAccessor().setAction(menuEntry, action);

		menuActionGroupBuilder.visit(menuEntry);

		final JMenuItem menuItem = getFirstSubMenuItem(menuEntry);
		assertThatMenuItemHasCorrectAction(menuItem);
	}