@Test
	public void testGetByteDifferences() throws Exception {
		programBuilder1.createMemory("d1", "0x100", 0x100, null, (byte) 0xAC);
		programBuilder1.createMemory("d2", "0x200", 0x100);
		programBuilder1.createLabel("0x01006420", "Function1");
		programBuilder1.createComment("0x010059a3", "Here we are.", CommentType.EOL);
		programBuilder1.setBytes("0x01002b45", "ee");
		programBuilder1.setBytes("0x01002b49", "57");

		programBuilder2.createMemory("d1", "0x100", 0x100, null, (byte) 0xAF);
		programBuilder2.createMemory("d4", "0x400", 0x100);
		programBuilder2.createLabel("0x01006420", "Function2");
		programBuilder2.createComment("0x010059a3", "There you have it.", CommentType.EOL);
		programBuilder2.setBytes("0x01002b45", "8b");
		programBuilder2.setBytes("0x01002b49", "ee");

		// p1 has 0x100 to 0x1ff with byte values of 0xCF, but in p2 of 0xAF.
		// p1 has changed byte at 0x1002b45 from 0x8b to 0xee.
		// p2 has changed byte at 0x1002b49 from 0x57 to 0xee.
		programDiff = new ProgramDiff(p1, p2);
		programDiff.setFilter(new ProgramDiffFilter(ProgramDiffFilter.BYTE_DIFFS));
		AddressSet as = new AddressSet();
		as.addRange(addr(p1, 0x100), addr(p1, 0x1ff));// byte values differ
		as.addRange(addr(p1, 0x200), addr(p1, 0x2ff));// no bytes (no memory) for program2.
		as.addRange(addr(p1, 0x400), addr(p1, 0x4ff));// no bytes (no memory) for program1.
		as.addRange(addr(p1, 0x01002b45), addr(p1, 0x01002b45));
		as.addRange(addr(p1, 0x01002b49), addr(p1, 0x01002b49));
		checkAddressSet(as, programDiff.getDifferences(programDiff.getFilter(), null));
	}
Test that ProgramDiff can determine the byte differences between Program1
and Program2.
Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramDiff1Test.java