protected void closeToolAndWait(PluginTool tool) {
		testEnv.closeTool(tool);

		int maxTimeout = 10000;
		int sleepTime = 250;
		int waitTime = 0;
		while (tool.isVisible() && waitTime < maxTimeout) {
			try {
				Thread.sleep(sleepTime);
			}
			catch (InterruptedException e) {
				// don't care, will try again
			}
			waitTime += sleepTime;
		}

		assertTrue("Unable to close tool for test!", !tool.isVisible());
	}
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/AbstractToolSavingTest.java