@Test
	public void testCopyFragmentToFolder() throws Exception {

		ProgramNode node = (ProgramNode) root.getChildAt(0);

		setSelectionPath(node);
		assertTrue(copyAction.isEnabled());
		performTreeAction(copyAction);

		node = (ProgramNode) root.getChildAt(5);
		int origCount = node.getChildCount();
		setSelectionPath(node);
		assertTrue(pasteAction.isEnabled());

		performTreeAction(pasteAction);
		waitForProgram(program);

		expandNode(node);
		ProgramNode child = (ProgramNode) node.getChildAt(node.getChildCount() - 1);
		assertEquals(".text", child.getName());

		ProgramNode[] nodes = findNodes("DLLs");
		for (ProgramNode node2 : nodes) {
			assertNotNull(node2.getChild(".text"));
		}

		undo();
		node = (ProgramNode) root.getChildAt(5);
		assertEquals(origCount, node.getChildCount());
		redo();
		node = (ProgramNode) root.getChildAt(5);
		assertEquals(origCount + 1, node.getChildCount());

	}
Tests for cut/copy/paste in the Program tree.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/programtree/ProgramTreePlugin2Test.java