@Test
	public void testRenameFileInUse() throws Exception {
		GTreeNode npNode = rootNode.getChild("notepad");
		DomainFile df = ((DomainFileNode) npNode).getDomainFile();

		setInUse(df);

		setSelectionPath(npNode.getTreePath());

		DockingActionIf renameAction = getAction("Rename");
		executeOnSwingWithoutBlocking(
			() -> performAction(renameAction, getTreeActionContext(), true));
		waitForSwing();

		DialogComponentProvider d = waitForDialogComponent("Rename Not Allowed");
		pressButtonByText(d.getComponent(), "OK");
		assertNotNull(rootNode.getChild("notepad"));
	}
Tests for actions in the front end (Ghidra project window)
Ghidra/Features/Base/src/test.slow/java/ghidra/framework/main/datatree/FrontEndPluginActionsTest.java