@Override
			public void modifyLatest(ProgramDB program) {
				ProgramContext context = program.getProgramContext();
				Register esiReg = context.getRegister("ESI");
				Register cxReg = context.getRegister("CX");
				ReferenceManager refMgr = program.getReferenceManager();
				Reference[] refs;
				Reference newRef;

				refs = refMgr.getReferencesFrom(addr(program, "0x10018cd"), 0);
				assertEquals(0, refs.length);
				newRef =
					refMgr.addRegisterReference(addr(program, "0x10018cd"), 0, esiReg,
						RefType.READ, SourceType.DEFAULT);
				assertNotNull(newRef);

				refs = refMgr.getReferencesFrom(addr(program, "0x1002965"), 0);
				assertEquals(0, refs.length);
				newRef =
					refMgr.addRegisterReference(addr(program, "0x1002965"), 0, cxReg,
						RefType.READ, SourceType.DEFAULT);
				assertNotNull(newRef);

				refs = refMgr.getReferencesFrom(addr(program, "0x1002d18"), 1);
				assertEquals(0, refs.length);
				newRef =
					refMgr.addStackReference(addr(program, "0x1002d18"), 1, -0x8, RefType.READ,
						SourceType.DEFAULT);
				assertNotNull(newRef);

				refs = refMgr.getReferencesFrom(addr(program, "0x1003409"), 0);
				assertEquals(0, refs.length);
//					newRef = refMgr.addStackReference(addr(program, "0x1003409"), 0, -0x8, RefType.READ, false);
				newRef =
					refMgr.addMemoryReference(addr(program, "0x1003409"),
						addr(program, "0x1001000"), RefType.READ, SourceType.DEFAULT, 0);
				assertNotNull(newRef);
			}
Test the merge of the versioned program's listing.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/RefMergerRegTest.java