@Test
	public void testReplaceAction() {

		String miscName = "MISC";
		CategoryNode miscNode = (CategoryNode) programNode.getChild(miscName);
		expandNode(miscNode);

		String originalDtName = "ArrayStruct";
		DataTypeNode miscStructureNode = (DataTypeNode) miscNode.getChild(originalDtName);
		selectNode(miscStructureNode);

		DockingActionIf replaceAction = getAction(plugin, "Replace");
		assertTrue(replaceAction.isEnabledForContext(treeContext));
		DataTypeTestUtils.performAction(replaceAction, tree, false);

		String newDtName = "IntStruct";
		chooseDataType(newDtName);

		DataTypeNode updatedNode = (DataTypeNode) miscNode.getChild(newDtName);
		assertNotNull(updatedNode);
	}
Tests copy/paste/drag/drop operations
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/datamgr/DataTypeCopyMoveDragTest.java