@Test
	public void testChangeToStackParamConflictPickMy() throws Exception {

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

			@Override
			public void modifyOriginal(ProgramDB program) {
				try {
					Function applesFunction =
						createExternalFunction(program, new String[] { "user32.dll", "apples" },
							addr(program, "77db1020"), new ByteDataType(), SourceType.USER_DEFINED);
					assertNotNull(applesFunction);
					Parameter parameter1 = new ParameterImpl("P1", new DWordDataType(), program);
					parameter1.setComment("Test Parameter Comment");
					applesFunction.addParameter(parameter1, SourceType.USER_DEFINED);
					Parameter parameter2 = new ParameterImpl("P2", new FloatDataType(), program);
					applesFunction.addParameter(parameter2, SourceType.USER_DEFINED);

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

			@Override
			public void modifyLatest(ProgramDB program) {
				try {
					Function func =
						getExternalFunction(program, new String[] { "user32.dll", "apples" });
					assertNotNull(func);
					Parameter parameter0 = func.getParameter(0);
					assertNotNull(parameter0);
					func.removeParameter(0);

					func = getExternalFunction(program, new String[] { "user32.dll", "oranges" });
					Parameter parameter1 = func.getParameter(1);
					parameter1.setName("NewLatestName", SourceType.USER_DEFINED);
				}
				catch (Exception e) {
					e.printStackTrace();
					Assert.fail(e.getMessage());
				}
			}

			@Override
			public void modifyPrivate(ProgramDB program) {
				try {
					Function func =
						getExternalFunction(program, new String[] { "user32.dll", "apples" });
					assertNotNull(func);
					Parameter parameter0 = func.getParameter(0);
					assertNotNull(parameter0);
					parameter0.setName("NewMyName", SourceType.USER_DEFINED);

					func = getExternalFunction(program, new String[] { "user32.dll", "oranges" });
					Parameter parameter1 = func.getParameter(1);
					assertNotNull(parameter1);
					func.removeParameter(1);
				}
				catch (Exception e) {
					e.printStackTrace();
					Assert.fail(e.getMessage());
				}
			}
		});

		executeMerge(ASK_USER);
		chooseRadioButton(CHECKED_OUT_BUTTON_NAME);// byte apples(dword NewMyName, float P2)
		chooseRadioButton(CHECKED_OUT_BUTTON_NAME);// undefined oranges(dword A1)
		waitForMergeCompletion();

		ProgramContext context = resultProgram.getProgramContext();
		Register r12Reg = context.getRegister("r12");
		Register r11Reg = context.getRegister("r11");

		Function func = getExternalFunction(resultProgram, new String[] { "user32.dll", "apples" });
		Parameter[] parameters = func.getParameters();
		assertEquals(2, parameters.length);
		assertEquals("NewMyName", parameters[0].getName());
		assertEquals(r12Reg, parameters[0].getRegister());
		assertTrue(new DWordDataType().isEquivalent(parameters[0].getDataType()));
		assertEquals("P2", parameters[1].getName());
		assertEquals(r11Reg, parameters[1].getRegister());
		assertTrue(new FloatDataType().isEquivalent(parameters[1].getDataType()));
		Variable[] localVariables = func.getLocalVariables();
		assertEquals(0, localVariables.length);

		func = getExternalFunction(resultProgram, new String[] { "user32.dll", "oranges" });
		parameters = func.getParameters();
		assertEquals(1, parameters.length);
		assertEquals("A1", parameters[0].getName());
		assertEquals(r12Reg, parameters[0].getRegister());
		assertTrue(new DWordDataType().isEquivalent(parameters[0].getDataType()));
		localVariables = func.getLocalVariables();
		assertEquals(0, localVariables.length);
	}
Test the merge of external function variables.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/ExternalFunctionMergeManagerTest.java