@Test
	public void testSetIcon() throws Exception {
		ToolIconURL iconUrl = new ToolIconURL("Caution.png");
		iconList.setSelectedValue(iconUrl, true);
		ToolIconURL iconUrl2 = (ToolIconURL) iconList.getSelectedValue();
		assertEquals(iconUrl, iconUrl2);
		setText(toolNameField, "MyTestTool", false);
		pressButtonByText(saveDialog, "Save");

		assertTrue(!tool.hasConfigChanged());
		waitForSwing();
		assertTrue(!saveDialog.isVisible());
		ToolChest tc = tool.getProject().getLocalToolChest();
		ToolTemplate template = tc.getToolTemplate("MyTestTool");
		tc.remove("MyTestTool");

		Icon icon = ResourceManager.getScaledIcon(
			ResourceManager.loadIcon("defaultTools/images/Caution.png"),
			ToolIconURL.LARGE_ICON_SIZE, ToolIconURL.LARGE_ICON_SIZE);

		String expected = ResourceManager.getIconName(icon);
		String actual = ResourceManager.getIconName(template.getIcon());
		assertEquals(expected, actual);
	}
Tests for saving the tool config.
Ghidra/Features/ByteViewer/src/test.slow/java/ghidra/framework/plugintool/dialog/SaveToolConfigDialogTest.java