@Test
	public void testPasteFunctionLabelsComments() throws Exception {

		// in program(1) create a function with body 031b through 343
		Address min = addr(programOne, 0x31b);
		Address max = addr(programOne, 0x0343);
		Listing listing = programOne.getListing();

		// create a function over the range 0x31b through 0x0343.		
		int transactionID = programOne.startTransaction("test");
		String name = SymbolUtilities.getDefaultFunctionName(min);
		programOne.getListing()
				.createFunction(name, min, new AddressSet(min, max), SourceType.USER_DEFINED);
		programOne.endTransaction(transactionID, true);
		programOne.flushEvents();
		waitForSwing();

		// in Browser(2) select 31b through 343
		goTo(toolTwo, 0x031b);

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

		copyToolTwoLabels();

		// in Browser(1) go to 031b
		goTo(toolOne, 0x31b);

		pasteToolOne();

		// verify comments are copied
		CodeUnit cu = listing.getCodeUnitAt(addr(programOne, 0x0320));
		assertEquals("My Plate Comment", cu.getComment(CommentType.PLATE));
		assertEquals("My Post comment", cu.getComment(CommentType.POST));

		cu = listing.getCodeUnitAt(addr(programOne, 0x326));
		assertEquals("More Plate Comments (1)", cu.getComment(CommentType.PLATE));
		assertEquals("More Post comments (1)", cu.getComment(CommentType.POST));
		assertEquals("More EOL comments (1)", cu.getComment(CommentType.EOL));

		cu = listing.getCodeUnitAt(addr(programOne, 0x32a));
		assertEquals("More Plate Comments (2)", cu.getComment(CommentType.PLATE));
		assertEquals("More Post comments (2)", cu.getComment(CommentType.POST));
		assertEquals("More EOL comments (2)", cu.getComment(CommentType.EOL));

		cb.goToField(addr(programOne, 0x0320), PlateFieldFactory.FIELD_NAME, 0, 0);
		ListingTextField f = (ListingTextField) cb.getCurrentField();
		assertEquals(3, f.getNumRows());
		assertTrue(f.getText().indexOf("My Plate Comment") > 0);

		cb.goToField(addr(programOne, 0x0320), PostCommentFieldFactory.FIELD_NAME, 0, 0);
		f = (ListingTextField) cb.getCurrentField();
		assertEquals("My Post comment", f.getText());

		cb.goToField(addr(programOne, 0x0326), PlateFieldFactory.FIELD_NAME, 0, 0);
		f = (ListingTextField) cb.getCurrentField();
		assertEquals(3, f.getNumRows());
		assertTrue(f.getText().indexOf("More Plate Comments (1)") > 0);

		cb.goToField(addr(programOne, 0x0326), PostCommentFieldFactory.FIELD_NAME, 0, 0);
		f = (ListingTextField) cb.getCurrentField();
		assertEquals("More Post comments (1)", f.getText());

		cb.goToField(addr(programOne, 0x032a), EolCommentFieldFactory.FIELD_NAME, 0, 0);
		f = (ListingTextField) cb.getCurrentField();
		assertEquals("More EOL comments (2)", 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