@Test
	public void testCutFolderExpanded2() throws Exception {
		// cut a folder that has descendants expanded,
		// collapse the destination folder and paste.
		// The destination folder should remain collapsed.
		ProgramNode stringsNode = root.getChild("Strings");
		visitNode(stringsNode);
		ProgramNode lnode = stringsNode.getChild("L");
		expandPath(lnode.getTreePath());

		// Strings, L are expanded

		// select Strings
		setSelectionPath(stringsNode);

		// cut Strings
		performTreeAction(cutAction);
		// paste at Functions
		ProgramNode funcNode = root.getChild("Functions");
		collapsePath(funcNode.getTreePath());
		setSelectionPath(funcNode);
		assertTrue(pasteAction.isEnabled());
		performTreeAction(pasteAction);

		// Functions should remain collapsed
		assertTrue(tree.isCollapsed(funcNode.getTreePath()));
		stringsNode = funcNode.getChild("Strings");
		assertTrue(tree.isCollapsed(stringsNode.getTreePath()));
	}
Tests for cut/copy/paste in the Program tree.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/programtree/ProgramTreePlugin2Test.java