@Test
	public void testPasteAtExistingDefaultLabel() throws Exception {

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

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

		copyToolTwoLabels();

		// in Browser(1) go to 331 -- should contain a default label
		goTo(toolOne, 0x0331);

		Symbol[] symbols = programOne.getSymbolTable().getSymbols(addr(programOne, 0x0331));

		assertTrue(symbols[0].getSource() == SourceType.DEFAULT);

		cb.goToField(addr(programOne, 0x0331), LabelFieldFactory.FIELD_NAME, 0, 0);
		ListingTextField f = (ListingTextField) cb.getCurrentField();
		assertEquals(symbols[0].getName(), f.getText());

		pasteToolOne();

		// default label should be replaced by RSR10
		assertNull(
			programOne.getSymbolTable().getSymbol("LAB_0331", addr(programOne, 0x0331), null));
		Symbol symbol = getUniqueSymbol(programOne, "RSR10", null);
		assertNotNull(symbol);

		cb.goToField(addr(programOne, 0x0331), LabelFieldFactory.FIELD_NAME, 0, 0);
		f = (ListingTextField) cb.getCurrentField();
		assertEquals(symbol.getName(), f.getText());

		undo(programOne);
		cb.goToField(addr(programOne, 0x0331), LabelFieldFactory.FIELD_NAME, 0, 0);
		f = (ListingTextField) cb.getCurrentField();
		symbols = programOne.getSymbolTable().getSymbols(addr(programOne, 0x0331));
		assertEquals(1, symbols.length);
		assertEquals(symbols[0].getName(), f.getText());

		redo(programOne);
		cb.goToField(addr(programOne, 0x0331), LabelFieldFactory.FIELD_NAME, 0, 0);
		f = (ListingTextField) cb.getCurrentField();
		assertEquals("RSR10", f.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