@Test
    public void testCategoryDeleteRenameConflicts() throws Exception {
		// delete Category4 in Latest; in My program rename Category4 to "MyCategory4"

		mtf.initialize("notepad", new ProgramModifierListener() {
			@Override
			public void modifyLatest(ProgramDB program) {
				DataTypeManager dtm = program.getDataTypeManager();
				Category c = dtm.getCategory(new CategoryPath("/Category1/Category2"));
				c.removeCategory("Category4", TaskMonitor.DUMMY);
			}

			@Override
			public void modifyPrivate(ProgramDB program) {
				DataTypeManager dtm = program.getDataTypeManager();
				Category c = dtm.getCategory(new CategoryPath("/Category1/Category2/Category4"));
				try {
					c.setName("My Category4");
				}
				catch (DuplicateNameException e) {
					Assert.fail("Got DuplicateNameException: " + e);
				}
				catch (InvalidNameException e) {
					Assert.fail("Got InvalidNameException: " + e);
				}
			}
		});
		// choose my program change
		executeMerge(DataTypeMergeManager.OPTION_MY);
		DataTypeManager dtm = resultProgram.getDataTypeManager();
		Category c = dtm.getCategory(new CategoryPath("/Category1/Category2"));
		assertTrue(dtm.containsCategory(c.getCategoryPath()));
		assertNotNull(c.getCategory("My Category4"));
		checkConflictCount(0);
	}
Tests for the merge data type manager.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/datatypes/CategoryMerge2Test.java