@Test
    public void testCategoryAddedInLatestProgram2() throws Exception {
		// In Latest, add "AnotherCategory to /Category1/Category2/Category5; 
		// in my program, add a category to /MISC
		mtf.initialize("notepad", new ProgramModifierListener() {
			
			@Override
			public void modifyLatest(ProgramDB program) {
				DataTypeManager dtm = program.getDataTypeManager();
				Category c = dtm.getCategory(new CategoryPath("/Category1/Category2/Category5"));
				try {
					c = c.createCategory("AnotherCategory");
					c.createCategory("Subcategory");
				}
				catch (InvalidNameException e) {
					Assert.fail("Got InvalidNameException!");
				}
			}

			
			@Override
			public void modifyPrivate(ProgramDB program) {
				// change the name
				Category c = program.getDataTypeManager().getCategory(new CategoryPath("/MISC"));
				try {
					c = c.createCategory("MyCategory");
				}
				catch (InvalidNameException e) {
					Assert.fail("Got Invalid Name Exception! " + e.getMessage());
				}
			}
		});

		executeMerge(-1);
		// should end up with /Category1/Category2/My Category5/AnotherCategory/Subcategory
		DataTypeManager dtm = resultProgram.getDataTypeManager();

		Category c = dtm.getCategory(new CategoryPath("/Category1/Category2/Category5"));
		c = c.getCategory("AnotherCategory");
		assertNotNull(c);
		assertNotNull(c.getCategory("Subcategory"));
		c = dtm.getCategory(new CategoryPath("/MISC/MyCategory"));
		assertNotNull(c);
		checkConflictCount(0);
	}
Tests for the merge data type manager.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/datatypes/CategoryMerge2Test.java