@Test
	public void testEditExistingEnum2() throws Exception {
		// add a new entry

		Enum enummDt = createRedGreenBlueEnum();
		edit(enummDt);

		EnumEditorPanel panel = findEditorPanel(tool.getToolFrame());
		final JTable table = panel.getTable();
		final EnumTableModel model = (EnumTableModel) table.getModel();
		addEntry(table, model, "Purple", 7);

		apply();

		Category cat =
			program.getListing().getDataTypeManager().getCategory(enummDt.getCategoryPath());
		Enum en = (Enum) cat.getDataType("Colors");
		String[] names = en.getNames();
		assertEquals(4, names.length);
		assertEquals(7, en.getValue("Purple"));
	}
Tests for editing an Enumerated data type.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/datamgr/editor/EnumEditor1Test.java