@Override
			public void modifyLatest(ProgramDB program) {
				try {
					Function func;
					AddRegisterParameterCommand cmd;
					Register regR1 = program.getProgramContext().getRegister("r1");
					Register regR3 = program.getProgramContext().getRegister("r3");

					func = getExternalFunction(program, new String[] { "user32.dll", "apples" });
					func.setCustomVariableStorage(true);
					cmd = new AddRegisterParameterCommand(func, regR1, "Latest_1",
						new FloatDataType(), 1, SourceType.USER_DEFINED);
					cmd.applyTo(program);

					func = getExternalFunction(program, new String[] { "user32.dll", "oranges" });
					func.setCustomVariableStorage(true);
					cmd = new AddRegisterParameterCommand(func, regR3, "Latest_3",
						new FloatDataType(), 1, SourceType.USER_DEFINED);
					cmd.applyTo(program);
				}
				catch (Exception e) {
					e.printStackTrace();
					Assert.fail(e.getMessage());
				}
			}
Test the merge of external function variables.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/ExternalFunctionMergeManagerTest.java