@Test
	public void testReplaceCommentDifferences() throws Exception {
		// 0x1002040: p1 has Plate, Pre, EOL, Post, & Repeatable comment.
		programBuilder1.createComment("0x1002040", "My Plate Comment", CommentType.PLATE);
		programBuilder1.createComment("0x1002040", "My Pre Comment", CommentType.PRE);
		programBuilder1.createComment("0x1002040", "My EOL Comment", CommentType.EOL);
		programBuilder1.createComment("0x1002040", "My Post Comment", CommentType.POST);
		programBuilder1.createComment("0x1002040", "My Repeatable Comment", CommentType.REPEATABLE);
		// 0x100204c: p2 has Plate, Pre, EOL, Post, & Repeatable comment.
		programBuilder2.createComment("0x100204c", "Other Plate Comment", CommentType.PLATE);
		programBuilder2.createComment("0x100204c", "Other Pre Comment", CommentType.PRE);
		programBuilder2.createComment("0x100204c", "Other EOL Comment", CommentType.EOL);
		programBuilder2.createComment("0x100204c", "Other Post Comment", CommentType.POST);
		programBuilder2.createComment("0x100204c", "Other Repeatable Comment",
			CommentType.REPEATABLE);
		// 0x1002304: p1 has EOL comment.
		programBuilder1.createComment("0x1002304", "My EOL Comment", CommentType.EOL);
		// 0x1002306: p1 has pre-comment.
		programBuilder1.createComment("0x1002306", "My Pre Comment", CommentType.PRE);
		// 0x100230b: p1 has plate and post comments.
		programBuilder1.createComment("0x100230b", "My Plate Comment", CommentType.PLATE);
		programBuilder1.createComment("0x100230b", "My Post Comment", CommentType.POST);
		// 0x100230d: p2 plate comments contain the p1 comment string.
		programBuilder1.createComment("0x100230d", "Plate Comment", CommentType.PLATE);
		programBuilder2.createComment("0x100230d", "Other Plate Comment", CommentType.PLATE);
		// 0x100230d: p2 pre comments contain the p1 comment string.
		programBuilder1.createComment("0x100230d", "Pre Comment", CommentType.PRE);
		programBuilder2.createComment("0x100230d", "Other Pre Comment", CommentType.PRE);
		// 0x100230d: p2 eol comments contain the p1 comment string.
		programBuilder1.createComment("0x100230d", "EOL Comment", CommentType.EOL);
		programBuilder2.createComment("0x100230d", "Other EOL Comment", CommentType.EOL);
		// 0x100230d: p2 post comments contain the p1 comment string.
		programBuilder1.createComment("0x100230d", "Post Comment", CommentType.POST);
		programBuilder2.createComment("0x100230d", "Other Post Comment", CommentType.POST);
		// 0x100230d: p2 repeatable comments contain the p1 comment string.
		programBuilder1.createComment("0x100230d", "Repeatable Comment", CommentType.REPEATABLE);
		programBuilder2.createComment("0x100230d", "Other Repeatable Comment",
			CommentType.REPEATABLE);
		// 0x1002336: Different Repeatable comments.
		programBuilder1.createComment("0x1002336", "Once upon a time,", CommentType.REPEATABLE);
		programBuilder2.createComment("0x1002336", "This is a sample comment.",
			CommentType.REPEATABLE);
		// 0x1002346: P1 Repeatable comment contains P2 Repeatable comment.
		programBuilder1.createComment("0x1002346", "This is a sample comment.",
			CommentType.REPEATABLE);
		programBuilder2.createComment("0x1002346", "This is a sample", CommentType.REPEATABLE);
		// 0x1002350: P1 Repeatable comment contained within P2 Repeatable comment.
		programBuilder1.createComment("0x1002350", "This is a sample", CommentType.REPEATABLE);
		programBuilder2.createComment("0x1002350", "This is a sample comment.",
			CommentType.REPEATABLE);
		// 0x100238f: Different EOL comments.
		programBuilder1.createComment("0x100238f", "Once upon a time,", CommentType.EOL);
		programBuilder2.createComment("0x100238f", "This is a sample comment.", CommentType.EOL);
		// 0x1002395: Different Pre comments.
		programBuilder1.createComment("0x1002395", "Once upon a time,", CommentType.PRE);
		programBuilder2.createComment("0x1002395", "This is a sample comment.", CommentType.PRE);
		// 0x100239d: Different Plate comments.
		programBuilder1.createComment("0x100239d", "Once upon a time,", CommentType.PLATE);
		programBuilder2.createComment("0x100239d", "This is a sample comment.", CommentType.PLATE);
		// 0x100239d: Different Post comments.
		programBuilder1.createComment("0x100239d", "Once upon a time,", CommentType.POST);
		programBuilder2.createComment("0x100239d", "This is a sample comment.", CommentType.POST);
		// 0x1002a91: p2 has a plate comment.
		programBuilder2.createComment("0x1002a91", "This is a sample comment.", CommentType.PLATE);
		// 0x10030d2: p1 has plate comment.
		programBuilder1.createComment("0x10030d2", "Once upon a time,", CommentType.PLATE);
		// 0x10030d8: p2 has plate comment.
		programBuilder2.createComment("0x10030d8", "This is a sample comment.", CommentType.PLATE);
		// 0x100355f: p1 has plate comment.
		programBuilder1.createComment("0x100355f", "Plate Comment", CommentType.PLATE);
		// 0x100415a: p1 and p2 have same plate comments.
		programBuilder1.createComment("0x100415a", "Plate Comment", CommentType.PLATE);
		programBuilder2.createComment("0x100415a", "Plate Comment", CommentType.PLATE);

		programMerge = new ProgramMergeManager(p1, p2);
		programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));
		programMerge.setMergeFilter(
			new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.REPLACE));
		AddressSet as = new AddressSet();
		as.addRange(addr(0x01002040), addr(0x01002040));
		as.addRange(addr(0x0100204c), addr(0x0100204c));
		as.addRange(addr(0x01002304), addr(0x01002304));
		as.addRange(addr(0x01002306), addr(0x01002306));
		as.addRange(addr(0x0100230b), addr(0x0100230b));
		as.addRange(addr(0x0100230d), addr(0x0100230d));
		as.addRange(addr(0x01002336), addr(0x01002336));
		as.addRange(addr(0x01002346), addr(0x01002346));
		as.addRange(addr(0x01002350), addr(0x01002350));
		as.addRange(addr(0x0100238f), addr(0x0100238f));
		as.addRange(addr(0x01002395), addr(0x01002395));
		as.addRange(addr(0x0100239d), addr(0x0100239d));
		as.addRange(addr(0x01002a91), addr(0x01002a91));
		as.addRange(addr(0x010030d2), addr(0x010030d2));
		as.addRange(addr(0x010030d8), addr(0x010030d8));
		as.addRange(addr(0x0100355f), addr(0x0100355f));
		AddressSetView diffAs = programMerge.getFilteredDifferences();
//		printAddressSet(as);
//		printAddressSet(diffAs);
		assertEquals(as, diffAs);
		programMerge.merge(as, TaskMonitor.DUMMY);
		assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
	}
Test that programMerge can determine where comments differ
between Program1 and Program2.
Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramMerge1Test.java