@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 createsMenuButtonWithAcceleratedAction() {
		final EntryAccessor entryAccessor = new EntryAccessor();
		entryAccessor.setComponent(menuEntry, menu);
		menuEntry.addChild(actionEntry);
		final KeyStroke keyStroke = KeyStroke.getKeyStroke('A');
		when(accelerators.getAccelerator(action)).thenReturn(keyStroke);
		menuActionGroupBuilder.visit(actionEntry);
		JMenuItem item = (JMenuItem) new EntryAccessor().getComponent(actionEntry);
		assertThat(item.getAccelerator(), equalTo(keyStroke));
	}