@Test
    public void testCategoryRenamedInLatest() throws Exception {

		// A category was renamed in the latest; not changed in my program
		mtf.initialize("notepad", new ProgramModifierListener() {
			@Override
			public void modifyLatest(ProgramDB program) {
				Category miscCat =
					program.getDataTypeManager().getCategory(new CategoryPath("/MISC"));
				try {
					miscCat.setName("My Misc");
				}
				catch (DuplicateNameException e) {
					Assert.fail("Got Duplicate name exception! " + e.getMessage());
				}
				catch (InvalidNameException e) {
					Assert.fail("Got Invalid Name Exception! " + e.getMessage());
				}
			}

			@Override
			public void modifyPrivate(ProgramDB program) {
				DataTypeManager dtm = program.getDataTypeManager();
				// move /Category1/Category2/Category5 to
				// /Category1/Category2/Category3
				Category c = dtm.getCategory(new CategoryPath("/Category1/Category2/Category5"));
				Category destCat =
					dtm.getCategory(new CategoryPath("/Category1/Category2/Category3"));
				try {
					destCat.moveCategory(c, TaskMonitor.DUMMY);
				}
				catch (DuplicateNameException e) {
					Assert.fail("Got Duplicate name exception!");
				}
			}
		});

		executeMerge(-1);
		DataTypeManager dtm = resultProgram.getDataTypeManager();
		Category root = resultProgram.getDataTypeManager().getCategory(CategoryPath.ROOT);
		assertNotNull(root.getCategory("My Misc"));
		assertNull(root.getCategory("MISC"));

		Category destCat = dtm.getCategory(new CategoryPath("/Category1/Category2/Category3"));
		assertNotNull(destCat.getCategory("Category5"));

		Category c = dtm.getCategory(new CategoryPath("/Category1/Category2/Category4"));
		assertNull(c.getCategory("Category5"));
	}
Tests for the merge data type manager.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/datatypes/CategoryMerge1Test.java