@Test
	public void testApplyLabelsInCycle() throws Exception {
		// Diff/Merge symbols from 1002950 to 100299b

		SymbolTable symtab1 = p1.getSymbolTable();
		symtab1.createLabel(addr(0x100295d), "ONE", SourceType.USER_DEFINED);
		symtab1.createLabel(addr(0x1002969), "TWO", SourceType.USER_DEFINED);
		symtab1.createLabel(addr(0x1002973), "THREE", SourceType.USER_DEFINED);
		SymbolTable symtab2 = p2.getSymbolTable();
		symtab2.createLabel(addr(0x100295d), "THREE", SourceType.USER_DEFINED);
		symtab2.createLabel(addr(0x1002969), "ONE", SourceType.USER_DEFINED);
		symtab2.createLabel(addr(0x1002973), "TWO", SourceType.USER_DEFINED);
		AddressSet as;
		AddressSet limitedAddrSet = new AddressSet(addr(0x1002950), addr(0x100299b));
		programMerge = new ProgramMergeManager(p1, p2, limitedAddrSet);

		as = new AddressSet();
		as.addRange(addr(0x100295d), addr(0x100295d));
		as.addRange(addr(0x1002969), addr(0x1002969));
		as.addRange(addr(0x1002973), addr(0x1002973));
		programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
		programMerge.setMergeFilter(
			new ProgramMergeFilter(ProgramMergeFilter.SYMBOLS, ProgramMergeFilter.REPLACE));
		AddressSetView diffAs = programMerge.getFilteredDifferences();
		assertEquals(as, diffAs);
		programMerge.merge(as, TaskMonitor.DUMMY);
		assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
	}
Test that programMerge can replace the symbol differences between
Program1 and Program2 when program1 and program2 have the same variables
at differing places that would cause a duplicate name when applied
individually but not if all are applied.
Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramMerge3Test.java