@Test
	public void testRunToolFromIcon() throws Exception {
		createTool();

		// verify there is a tool button for each config in the tool chest
		ToolTemplate[] configs = frontEndTool.getToolServices().getToolChest().getToolTemplates();
		for (ToolTemplate config : configs) {
			ToolButton b = findToolButton(frontEndTool.getToolFrame(), config.getName(), false);
			assertNotNull(b);
		}

		final ToolButton cbButton = findToolButton(frontEndTool.getToolFrame(), "Untitled", false);
		runSwing(() -> cbButton.doClick());

		// the button click triggers an animation, and then launches the tool, so we must wait
		// for the window to appear
		Window window = waitForWindow("Untitled(2)");
		assertNotNull(window);

		waitForCondition(() -> {
			PluginTool[] tools = frontEndTool.getToolServices().getRunningTools();
			return tools.length == 2;
		});

		ToolButton tb = findToolButton(frontEndTool.getToolFrame(), "Untitled", true);
		assertNotNull(tb);
	}
Tests for tool actions on the front end (Ghidra project window)
Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/main/ToolActionManagerTest.java