@Test
	public void testCodeBrowser_CopyFromFunction_PasteToLabel() throws Exception {
		//
		// Test that we can copy (simulating the keyboard action) from one function label and then
		// paste onto another label.  This is useful for copying across programs, as doing so
		// in the same program will fail due to a name collision.  So, we have to perform the
		// following steps to test the code:
		// 1) Name a label to a custom name
		// 2) Put the cursor on that label and execute the copy command (to get the name on the clipboard)
		// 3) Perform an undo to remove the custom name we created
		// 4) Put the cursor on a different label and execute the paste command
		//

		String functionName = "sscanf";
		FunctionNameFieldLocation location =
			new FunctionNameFieldLocation(program, addr("0100415a"), functionName);
		codeBrowserPlugin.goTo(location);

		// 1)
		String newLabelName = "BigBuddyBob";
		renameLabel(location, functionName, newLabelName);

		ProgramLocation currentLocation = codeBrowserPlugin.getCurrentLocation();
		assertTrue(currentLocation instanceof FunctionNameFieldLocation);
		location = (FunctionNameFieldLocation) currentLocation;
		assertTrue(newLabelName.equals(location.getFunctionName()));

		assertTrue(codeBrowserClipboardProvider.canCopy());

		// 2)
		DockingAction copyAction = getAction(codeBrowserClipboardProvider, COPY_ACTION_NAME);
		ActionContext context = codeViewerProvider.getActionContext(null);
		performAction(copyAction, context, true);
		assertEquals(newLabelName, getClipboardContents());

		// 3)
		undo(program);

		// 4)
		LabelFieldLocation newLabelLocation =
			new LabelFieldLocation(program, addr("01002d0f"), "DAT_01002d0f", null, 0);
		codeBrowserPlugin.goTo(newLabelLocation);

		DockingAction pasteAction = getAction(codeBrowserClipboardProvider, PASTE_ACTION_NAME);
		context = codeViewerProvider.getActionContext(null);
		performAction(pasteAction, context, true);
		waitForBusyTool(tool);

		currentLocation = codeBrowserPlugin.getCurrentLocation();
		assertTrue(currentLocation instanceof LabelFieldLocation);
		LabelFieldLocation labelLocation = (LabelFieldLocation) currentLocation;
		assertEquals(newLabelName, labelLocation.getName());
	}
Note: This test is sensitive to focus. So, don't click any windows while this test is running.
Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/app/plugin/core/clipboard/ClipboardPluginTest.java