@Test
	public void testValueForNewEntry() throws Exception {
		Category cat = program.getListing()
				.getDataTypeManager()
				.getCategory(new CategoryPath(CategoryPath.ROOT, "Category1"));
		final Enum enumm = new EnumDataType("Colors", 1);
		enumm.add("Red", 0x10);
		enumm.add("Green", 0x20);
		enumm.add("Blue", 0x30);

		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());
		final JTable table = panel.getTable();
		final EnumTableModel model = (EnumTableModel) table.getModel();
		runSwing(() -> {
			int lastRow = model.getRowCount() - 1;
			table.addRowSelectionInterval(lastRow, lastRow);
			DockingActionIf addAction = getAddAction();
			addAction.actionPerformed(new DefaultActionContext());
		});
		waitForSwing();

		assertEquals(0x31L, model.getValueAt(3, VALUE_COL));
	}
Tests for editing an Enumerated data type.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/datamgr/editor/EnumEditor1Test.java