@Test
	public void testMemRefRemoveVsChangePickMy() throws Exception {
		mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() {

			// Mem Refs
			// 01001a92: op0 to 01001370 DAT_01001370 DATA primary user
			// 01001abb: op0 to 01001ac1 LAB_01001ac1 CONDITIONAL_JUMP primary

			@Override
			public void modifyLatest(ProgramDB program) {
				ReferenceManager refMgr = program.getReferenceManager();
				Reference ref = refMgr.getReference(addr(program, "0x1001a92"),
					addr(program, "0x1001370"), 0);
				refMgr.delete(ref);

				ref = refMgr.getReference(addr(program, "0x1001abb"),
					addr(program, "0x1001ac1"), 0);
//					refMgr.setPrimary(ref, false);
				refMgr.updateRefType(ref, RefType.DATA_IND);
			}

			@Override
			public void modifyPrivate(ProgramDB program) {
				ReferenceManager refMgr = program.getReferenceManager();
				Reference ref = refMgr.getReference(addr(program, "0x1001a92"),
					addr(program, "0x1001370"), 0);
//					refMgr.setPrimary(ref, false);
				refMgr.updateRefType(ref, RefType.DATA_IND);

				ref = refMgr.getReference(addr(program, "0x1001abb"),
					addr(program, "0x1001ac1"), 0);
				refMgr.delete(ref);
			}
		});

		executeMerge(ASK_USER);
		chooseRadioButton(MY_BUTTON);
		chooseRadioButton(MY_BUTTON);
		waitForMergeCompletion();

		ReferenceManager refMgr = resultProgram.getReferenceManager();
		Reference ref = refMgr.getReference(addr("0x1001a92"), addr("0x1001370"), 0);
		assertNotNull(ref);
		assertEquals(RefType.DATA_IND, ref.getReferenceType());
		assertTrue(ref.isPrimary());

		ref = refMgr.getReference(addr("0x1001abb"), addr("0x1001ac1"), 0);
		assertNull(ref);
	}
Test the merge of the versioned program's listing.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/RefMergerMemTest.java