@Test
	public void testDiffMergeOverlayFunctionTags() throws Exception {
		mtf.initialize("overlayCalc", new MultiOverlayProgramModifierListener() {
			@Override
			public void modifyLatest(ProgramDB program) {
				// P1 program
				super.modifyLatest(program);
				try {
					Listing listing = program.getListing();

					Function f = listing.getFunctionAt(addr(program, "OtherOverlay:0x01001680"));
					f.addTag("Tag1");
				}
				catch (Exception e) {
					Assert.fail(e.getMessage());
				}
			}

			@Override
			public void modifyPrivate(ProgramDB program) {
				// P2 program
				super.modifyPrivate(program);
				try {
					Listing listing = program.getListing();
					Function f = listing.getFunctionAt(addr(program, "SomeOverlay:0x01001780"));
					f.addTag("Tag2");
				}
				catch (Exception e) {
					Assert.fail(e.getMessage());
				}
			}
		});

		p1 = mtf.getResultProgram();
		p2 = mtf.getPrivateProgram();

		AddressSet as = new AddressSet();
		as.addRange(addr(p1, "SomeOverlay::01001780"), addr(p1, "SomeOverlay::01001780"));
		as.addRange(addr(p1, "OtherOverlay::01001680"), addr(p1, "OtherOverlay::01001680"));

		ProgramMergeManager programMerge = new ProgramMergeManager(p1, p2);
		programMerge.setDiffFilter(new ProgramDiffFilter(
			ProgramDiffFilter.FUNCTION_DIFFS | ProgramDiffFilter.FUNCTION_TAG_DIFFS));
		programMerge.setMergeFilter(
			new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS | ProgramMergeFilter.FUNCTION_TAGS,
				ProgramMergeFilter.REPLACE));
		assertEquals(as, programMerge.getFilteredDifferences());

		p1.withTransaction("merge", () -> programMerge.merge(as, TaskMonitor.DUMMY));
		assertEquals(new AddressSet(), programMerge.getFilteredDifferences());

		Listing listing1 = p1.getListing();
		Function f = listing1.getFunctionAt(addr(p1, "SomeOverlay:0x01001780"));
		assertNotNull(f);
		Set<FunctionTag> tags = f.getTags();
		assertEquals(1, tags.size());
		FunctionTag tag = tags.iterator().next();
		assertEquals("Tag2", tag.getName());
	}
<CODE>ProgramDiffTest</CODE> tests the <CODE>ProgramDiff</CODE> class
to verify it correctly determines various types of program differences.
The setup for this test class loads two programs that were saved to the
testdata directory as XML. The tests will determine the differences between
these two programs.
Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramDiffMergeOverlayTest.java