@Test
	public void testChangeFunctionNameNoConflict() throws Exception {

		mtf.initialize("NotepadMergeListingTest", new OriginalProgramModifierListener() {

			@Override
			public void modifyOriginal(ProgramDB program) {
				try {
					Function applesFunction =
						createExternalFunction(program, new String[] { "user32.dll", "apples" });
					addParameter(applesFunction, "P1", SourceType.USER_DEFINED, new DWordDataType(),
						"Test Parameter Comment");

					Function orangesFunction =
						createExternalFunction(program, new String[] { "user32.dll", "oranges" });
					addParameter(orangesFunction, "P1", SourceType.USER_DEFINED,
						new DWordDataType(), "Test Parameter Comment");
				}
				catch (Exception e) {
					Assert.fail(e.getMessage());
				}
			}

			@Override
			public void modifyLatest(ProgramDB program) {
				try {
					Function function =
						getExternalFunction(program, new String[] { "user32.dll", "apples" });

					function.setName("BARNEY", SourceType.USER_DEFINED);
				}
				catch (Exception e) {
					Assert.fail(e.getMessage());
				}
				assertNotNull(
					getExternalFunction(program, new String[] { "user32.dll", "BARNEY" }));
				assertNull(getExternalFunction(program, new String[] { "user32.dll", "apples" }));
			}

			@Override
			public void modifyPrivate(ProgramDB program) {
				try {
					Function function =
						getExternalFunction(program, new String[] { "user32.dll", "oranges" });

					function.setName("FRED", SourceType.USER_DEFINED);
				}
				catch (Exception e) {
					Assert.fail(e.getMessage());
				}
				assertNotNull(getExternalFunction(program, new String[] { "user32.dll", "FRED" }));
				assertNull(getExternalFunction(program, new String[] { "user32.dll", "oranges" }));
			}
		});

		executeMerge(ASK_USER);
		waitForMergeCompletion();

		assertNull(getExternalFunction(resultProgram, new String[] { "user32.dll", "apples" }));
		assertNull(getExternalFunction(resultProgram, new String[] { "user32.dll", "oranges" }));
		assertNotNull(getExternalFunction(resultProgram, new String[] { "user32.dll", "BARNEY" }));
		assertNotNull(getExternalFunction(resultProgram, new String[] { "user32.dll", "FRED" }));
	}
Test the merge of external function variables.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/ExternalFunctionMergeManagerTest.java