@Test
	public void testDeleteTool() throws Exception {

		ToolChest toolChest = project.getLocalToolChest();

		// Make sure old tool instance does not exist
		toolChest.remove(TOOL_NAME);

		// create a new running tool
		runSwing(new Runnable() {
			@Override
			public void run() {
				runningTool = ProjectTestUtils.getTool(project, null);
			}
		});
		try {
			runningTool.setToolName(TOOL_NAME);

			// make sure tool config doesn't already exist in tool chest
			// to validate our test
			if (toolChest.getToolTemplate(TOOL_NAME) != null) {
				Assert.fail("Tool should not have been saved yet");
			}

			// save it to the tool chest
			ToolTemplate toolTemplate = runningTool.saveToolToToolTemplate();
			toolChest.addToolTemplate(toolTemplate);

			// now remove the tool config
			if (!toolChest.remove(TOOL_NAME)) {
				Assert.fail("Delete Tool FAILED: remove returned false when removing " + TOOL_NAME);
			}

			//
			// verify the tool is no longer in the project toolchest
			//
			if (toolChest.getToolTemplate(TOOL_NAME) != null) {
				Assert.fail("Non-running tool: " + TOOL_NAME + " was not deleted as expected!!!");
			}
		}
		finally {
			runSwing(new Runnable() {
				@Override
				public void run() {
					runningTool.close();
				}
			});
		}
	}
The following tests are performed in this test driver for
the new front end:
(1) delete a non-running tool from the user's project space
(2) delete a running tool from the user's project space
Ghidra/Features/Base/src/test.slow/java/ghidra/framework/project/tool/DeleteToolTest.java