@Test
	public void testCutFragmentInView() throws Exception {

		// copy a folder that is in the view to another folder
		// that is not in the view
		ProgramNode node = root.getChild("DLLs");

		// set the view to DLLs
		setSelectionPath(node);
		setViewPaths(new TreePath[] { node.getTreePath() });
		performTreeAction(copyAction);
		ProgramNode everythingNode = root.getChild("Everything");

		setSelectionPath(everythingNode);
		assertTrue(pasteAction.isEnabled());
		performTreeAction(pasteAction);
		waitForProgram(program);

		// cut a fragment in the view and paste onto a collapsed folder
		// not in the view
		// the first occurrence of the folder should indicate that one of
		// its descendants is in the view

		ProgramNode dataNode = root.getChild(".data");
		setSelectionPath(dataNode);
		setViewPaths(new TreePath[] { dataNode.getTreePath() });
		performTreeAction(cutAction);

		// select DLLs in Everything
		ProgramNode evNode = root.getChild("Everything");
		visitNode(evNode);
		ProgramNode dllsNode = evNode.getChild("DLLs");
		visitNode(dllsNode);
		setSelectionPath(dllsNode);

		performTreeAction(pasteAction);

		// first occurrence of DLLs should have icon for descendant in view
		ProgramNode[] nodes = findNodes("DLLs");
		int row = getRowForPath(nodes[0].getTreePath());

		Component comp = getCellRendererComponentForNonLeaf(nodes[0], row);
		assertEquals(new GIcon(DnDTreeCellRenderer.VIEWED_CLOSED_FOLDER_WITH_DESC),
			((JLabel) comp).getIcon());

		visitNode(nodes[0]);
		dataNode = nodes[0].getChild(".data");
		assertTrue(plugin.getView().hasSameAddresses(dataNode.getFragment()));
	}
Tests for cut/copy/paste in the Program tree.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/programtree/ProgramTreePlugin2Test.java