private PluginTool waitForTool(String toolName, Project project) {
		PluginTool tool = null;
		int sleepTime = 100;
		int waitCount = 0;
		while (tool == null && waitCount < 300) {
			waitForSwing();
			sleep(sleepTime);
			ToolManager toolManager = project.getToolManager();
			PluginTool[] runningTools = toolManager.getRunningTools();
			if (runningTools != null && runningTools.length > 0) {
				tool = runningTools[0];
			}
		}

		assertNotNull("Did not find a single running " + toolName + " tool", tool);
		assertEquals("Running tool is not " + toolName, toolName, tool.getName());

		return tool;
	}
Tests for tool actions on the front end (Ghidra project window)
Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/main/ToolActionManagerTest.java