@Test
	public void testChangeLatestRemoveMy() throws Exception {
		mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() {

			@Override
			public void modifyLatest(ProgramDB program) throws Exception {
				try {
					Function func = getFunction(program, "0x10031ee");
					func.addLocalVariable(
						new LocalVariableImpl("local_24", new DWordDataType(), -24, program),
						SourceType.USER_DEFINED);
					func = getFunction(program, "0x1003bed");
					func.setReturnType(new FloatDataType(), SourceType.ANALYSIS);
				}
				catch (DuplicateNameException e) {
					e.printStackTrace();
					Assert.fail(e.getMessage());
				}
			}

			@Override
			public void modifyPrivate(ProgramDB program) throws Exception {
				removeFunction(program, "0x10031ee");
				removeFunction(program, "0x1003bed");
			}
		});

		executeMerge(ASK_USER);
		verticalChooseFunction("0x10031ee", KEEP_LATEST);
		verticalChooseFunction("0x1003bed", KEEP_MY);
		waitForMergeCompletion();

		AddressSet body10031ee = new AddressSet(addr("0x10031ee"), addr("0x100324f"));
		checkFunction(resultProgram, "0x10031ee", "FUN_010031ee", body10031ee);
		noFunction(resultProgram, "0x1003bed");
	}
Test the merge of the versioned program's listing.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/FunctionMergeManagerTest.java