public void setupContentsNamesChangedUseForAllTest() throws Exception {
		// Both contents changed and both names changed
		// conflict resolution = KEEP_OTHER_NAME
		mtf.initialize("notepad", new ProgramModifierListener() {

			@Override
			public void modifyLatest(ProgramDB program) {
				Listing listing = program.getListing();
				try {
					ProgramModule mainRoot = listing.getRootModule("Main Tree");
					mainRoot.createFragment("frag_one");
					mainRoot.createModule("latest module");
					listing.renameTree("Main Tree", "LatestMainTree");

					ProgramModule root3 = listing.getRootModule("Tree Three");
					root3.createFragment("frag_99");
					root3.createModule("latest module 55");
					listing.renameTree("Tree Three", "Latest Tree 3");

					listing.renameTree("Tree Two", "Latest Tree 2");
				}
				catch (DuplicateNameException e) {
					Assert.fail("Got Duplicate name exception!");
				}
			}

			@Override
			public void modifyPrivate(ProgramDB program) throws DuplicateGroupException {
				try {
					Listing listing = program.getListing();

					ProgramModule m = listing.getModule("Main Tree", "Strings");
					ProgramFragment textFrag = listing.getFragment("Main Tree", ".text");
					// create a module
					m = m.createModule("my new module");
					// create a fragment under "my new module"
					ProgramFragment frag = m.createFragment("my fragment");
					try {
						frag.move(textFrag.getMinAddress(), textFrag.getMaxAddress());
					}
					catch (NotFoundException e1) {
						Assert.fail("Got NotFoundException!");
					}
					listing.renameTree("Main Tree", "Another Main Tree");

					ProgramModule moduleB = listing.getModule("Tree Three", "B");
					ProgramFragment textFrag3 = listing.getFragment("Tree Three", ".text");
					moduleB.add(textFrag3);
					listing.renameTree("Tree Three", "My Tree 3");

					listing.renameTree("Tree Two", "My Tree 2");
				}
				catch (DuplicateNameException e) {
					Assert.fail("Got duplicate name exception!");
				}
			}
		});
	}
Test the tree merger and its Use For All checkbox option.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/tree/ProgramTreeMergeManagerUseForAllTest.java