@Test
	public void testPasteAtUserLabel() throws Exception {

		// in Browser(2) select 331 through 334, contains "RSR10"
		goTo(toolTwo, 0x0331);

		makeSelection(toolTwo, programTwo, addr(programTwo, 0x0331), addr(programTwo, 0x0334));

		copyToolTwoLabels();

		Symbol symbol =
			programOne.getSymbolTable().getSymbol("LAB_0331", addr(programOne, 0x0331), null);
		// in Browser(1) change default label at 331 to JUNK
		int transactionID = programOne.startTransaction("test");
		programOne.getSymbolTable()
				.createLabel(addr(programOne, 0x0331), "JUNK", SourceType.USER_DEFINED);
		programOne.endTransaction(transactionID, true);
		//
		// in Browser(1) go to 331
		goTo(toolOne, 0x331);

		pasteToolOne();

		// verify that RSR10 and JUNK exist
		symbol = getUniqueSymbol(programOne, "RSR10", null);
		assertNotNull(symbol);
		assertEquals(addr(programOne, 0x331), symbol.getAddress());
		symbol = getUniqueSymbol(programOne, "JUNK", null);
		assertNotNull(symbol);
		assertEquals(addr(programOne, 0x331), symbol.getAddress());

		cb.goToField(addr(programOne, 0x0331), LabelFieldFactory.FIELD_NAME, 0, 0);
		ListingTextField f = (ListingTextField) cb.getCurrentField();
		assertEquals(2, f.getNumRows());
		assertEquals("RSR10", f.getFieldElement(0, 0).getText());
		assertEquals("JUNK", f.getFieldElement(1, 0).getText());

		undo(programOne);
		cb.goToField(addr(programOne, 0x0331), LabelFieldFactory.FIELD_NAME, 0, 0);
		f = (ListingTextField) cb.getCurrentField();
		assertEquals("JUNK", f.getText());

		redo(programOne);
		cb.goToField(addr(programOne, 0x0331), LabelFieldFactory.FIELD_NAME, 0, 0);
		f = (ListingTextField) cb.getCurrentField();

		assertEquals(2, f.getNumRows());
		assertEquals("RSR10", f.getFieldElement(0, 0).getText());
		assertEquals("JUNK", f.getFieldElement(1, 0).getText());
	}
Test the plugin that deals with cut/paste comments and labels
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/clipboard/CopyPasteCommentsTest.java