@Test
	public void testSameSymbolSource() throws Exception {
		mtf.initialize("NotepadMergeListingTest", new ProgramModifierListener() {
			@Override
			public void modifyLatest(ProgramDB program) {
				// P1 program
				SymbolTable st = program.getSymbolTable();
				Namespace namespace = program.getGlobalNamespace();
				try {
					createDataReference(program, addr(program, "0x01001e81"),
						addr(program, "0x01001ea0"));
					st.createLabel(addr(program, "0x01001ea9"), "One", namespace,
						SourceType.USER_DEFINED);
					st.createLabel(addr(program, "0x01001eb5"), "Two", namespace,
						SourceType.IMPORTED);
					st.createLabel(addr(program, "0x01001ebc"), "Three", namespace,
						SourceType.ANALYSIS);
				}
				catch (Exception e) {
					Assert.fail(e.getMessage());
				}
				try {
					st.createLabel(addr(program, "0x01001ec6"), "LAB_01001ec6", namespace,
						SourceType.DEFAULT);
					Assert.fail("Shouldn't be able to create symbol for a default label.");
				}
				catch (Exception e) {
					// good; expected
				}
			}

			@Override
			public void modifyPrivate(ProgramDB program) {
				// P2 program
				SymbolTable st = program.getSymbolTable();
				Namespace namespace = program.getGlobalNamespace();
				try {
					createDataReference(program, addr(program, "0x01001e81"),
						addr(program, "0x01001ea0"));
					st.createLabel(addr(program, "0x01001ea9"), "One", namespace,
						SourceType.USER_DEFINED);
					st.createLabel(addr(program, "0x01001eb5"), "Two", namespace,
						SourceType.IMPORTED);
					st.createLabel(addr(program, "0x01001ebc"), "Three", namespace,
						SourceType.ANALYSIS);
				}
				catch (Exception e) {
					Assert.fail(e.getMessage());
				}
				try {
					st.createLabel(addr(program, "0x01001ec6"), "LAB_01001ec6", namespace,
						SourceType.DEFAULT);
					Assert.fail("Shouldn't be able to create symbol for a default label.");
				}
				catch (Exception e) {
					// good; expected
				}
			}
		});

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

		programDiff = new ProgramDiff(p1, p2);
		AddressSet as = new AddressSet();
		programDiff.setFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
		assertEquals(as, programDiff.getDifferences(programDiff.getFilter(), null));
	}
Test that ProgramDiff recognizes that the 2 programs have the same
address spaces.
Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramDiff2Test.java