@Test
	public void testAutoSaveSingleTool() throws IOException {
		PluginTool tool = launchTool(DEFAULT_TEST_TOOL_NAME);

		//
		// position
		//

		Point position = new Point(50, 50);
		setToolPosition(tool, position);
		Point newToolPosition = getToolPosition(tool);
		assertEquals("Tool positioning was not saved", position, newToolPosition);

		closeToolAndWait(tool);
		waitForSwing();

		tool = launchTool(DEFAULT_TEST_TOOL_NAME);
		Point restoredToolPosition = getToolPosition(tool);
		if (!position.equals(restoredToolPosition)) {
			System.err.println("About to fail test.  Did the correct x,y values get saved?: ");
			printToolXmlContainting(DEFAULT_TEST_TOOL_NAME, "X_POS");
			// dumpToolFile(DEFAULT_TEST_TOOL_NAME);
		}

		assertEquals("Tool positioning was not saved", position, restoredToolPosition);

		//
		// layout
		//
		boolean isShowing = isBookmarkProviderShowing(tool);
		setBookmarkProviderShowing(tool, !isShowing);

		closeToolAndWait(tool);
		waitForSwing();

		tool = launchTool(DEFAULT_TEST_TOOL_NAME);
		boolean isNowShowing = isBookmarkProviderShowing(tool);
		assertEquals("Tool layout was not saved", !isShowing, isNowShowing);

		//
		// size
		//
		Dimension size = new Dimension(300, 300);
		setToolSize(tool, size);

		closeToolAndWait(tool);
		waitForSwing();

		tool = launchTool(DEFAULT_TEST_TOOL_NAME);
		Dimension newSize = getToolSize(tool);

		assertEquals("Tool size was not saved", size, newSize);

		//
		// option change
		//
		setBooleanFooOptions(tool, true);
		closeToolAndWait(tool);
		waitForSwing();

		tool = launchTool(DEFAULT_TEST_TOOL_NAME);
		assertEquals("Tool options not saved", true, getBooleanFooOptions(tool));
	}
A test that outlines and tests the expected saving action of tools that are closed.  Normally,
a tool will save itself when closed, but sometimes it cannot.  This test class verifies these
conditions.
Ghidra/Features/Base/src/test.slow/java/ghidra/framework/project/tool/ToolSaving1Test.java