@Test
	public void testEditExistingEnum1() throws Exception {

		Category cat = program.getListing()
				.getDataTypeManager()
				.getCategory(new CategoryPath(CategoryPath.ROOT, "Category1"));
		final Enum enumm = new EnumDataType("Colors", 1);
		enumm.add("Red", 0);
		enumm.add("Green", 1);
		enumm.add("Blue", 2);

		int transactionID = program.startTransaction("Test");
		final Enum enummDt = (Enum) cat.addDataType(enumm, DataTypeConflictHandler.DEFAULT_HANDLER);
		program.endTransaction(transactionID, true);
		program.flushEvents();
		waitForSwing();

		edit(enummDt);

		EnumEditorPanel panel = findEditorPanel(tool.getToolFrame());
		JTable table = panel.getTable();
		EnumTableModel model = (EnumTableModel) table.getModel();

		// change entry Name  Blue to Cyan
		String newValue = "Cyan";
		editNameInTable(2, newValue);

		assertEquals(newValue, model.getValueAt(2, NAME_COL));
		assertEquals(newValue, panel.getEnum().getName(2));

		apply();

		Enum en = (Enum) cat.getDataType("Colors");
		try {
			en.getValue("Blue");
			Assert.fail("Should not have found Blue!");
		}
		catch (NoSuchElementException e) {
			// expected
		}
		assertEquals(2, en.getValue("Cyan"));
	}
Tests for editing an Enumerated data type.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/datamgr/editor/EnumEditor1Test.java