@Test
	public void testAddExternalFunctionsWithFunctionConflicts() throws Exception {

		mtf.initialize("notepad", new ProgramModifierListener() {

			@Override
			public void modifyLatest(ProgramDB program) {
				try {
					createExternalFunction(program, new String[] { "user32.dll", "BETTY" },
						addr(program, "1002239"));

					createExternalFunction(program, new String[] { "user32.dll", "BARNEY" },
						addr(program, "77db1020"));
				}
				catch (Exception e) {
					Assert.fail(e.getMessage());
				}
			}

			@Override
			public void modifyPrivate(ProgramDB program) {
				try {
					createExternalFunction(program, new String[] { "user32.dll", "BETTY" },
						addr(program, "77db1020"));

					createExternalFunction(program, new String[] { "user32.dll", "BARNEY" },
						addr(program, "1002239"));
				}
				catch (Exception e) {
					Assert.fail(e.getMessage());
				}
			}
		});

		executeMerge(ASK_USER);
		chooseButtonAndApply("Resolve External Add Conflict", LATEST_BUTTON); // BETTY has address conflict
		chooseButtonAndApply("Resolve External Add Conflict", KEEP_BOTH_BUTTON); // BARNEY has address conflict

		waitForMergeCompletion();

		ExternalManager externalManager = resultProgram.getExternalManager();
		Set<ExternalLocation> externalLocations =
			externalManager.getExternalLocations("user32.dll", "BARNEY");
		assertEquals(2, externalLocations.size());
		assertHasExtAddresses(externalLocations, "1002239", "77db1020");

		externalLocations = externalManager.getExternalLocations("user32.dll", "BETTY");
		assertEquals(1, externalLocations.size());
		assertHasExtAddresses(externalLocations, "01002239");
	}
Test the merge of external function variables.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/ExternalFunctionMergeManagerTest.java