@Test
	public void testRenameFolderInUse() throws Exception {
		// folder contains a file that is in use
		DomainFolder f = rootFolder.createFolder("myFolder");
		f = f.createFolder("A");
		f = f.createFolder("B");
		f = f.createFolder("C");

		Program p = createDefaultProgram("new", ProgramBuilder._TOY, this);

		DomainFile df = f.createFile("notepad", p, TaskMonitor.DUMMY);
		waitForSwing();

		GTreeNode myNode = rootNode.getChild("myFolder");
		((DomainFolderNode) myNode).getDomainFolder().createFile("notepad", p, TaskMonitor.DUMMY);
		p.release(this);

		waitForSwing();
		tree.expandPath(myNode.getTreePath());
		assertNotNull(myNode.getChild("notepad"));

		setInUse(df, "/myFolder/notepad");

		setSelectionPath(myNode.getTreePath());

		DockingActionIf renameAction = getAction("Rename");
		performAction(renameAction, getTreeActionContext(), true);
		waitForTree();

		// attempt to rename "myFolder"
		runSwingLater(() -> {
			myNode.valueChanged("My_NewFolder");
		});

		waitForSwing();

		AbstractErrDialog d = waitForErrorDialog();
		assertEquals("Rename Failed", d.getTitle());
		close(d);
		assertNotNull(rootNode.getChild("myFolder"));
	}
Tests for actions in the front end (Ghidra project window)
Ghidra/Features/Base/src/test.slow/java/ghidra/framework/main/datatree/FrontEndPluginActionsTest.java