@Test
	public void testEnumSize1() throws Exception {
		Category category = program.getListing()
				.getDataTypeManager()
				.getCategory(new CategoryPath(CategoryPath.ROOT, "Category1"));
		Enum enumm = createEnum(category, "TestEnum", 1);
		edit(enumm);

		EnumEditorPanel panel = findEditorPanel(tool.getToolFrame());
		assertNotNull(panel);

		addEnumValue();

		waitForSwing();
		DockingActionIf applyAction = getApplyAction();
		assertTrue(applyAction.isEnabled());
		assertTrue(panel.needsSave());

		JTable table = panel.getTable();
		EnumTableModel model = (EnumTableModel) table.getModel();

		assertEquals("New_Name", model.getValueAt(0, NAME_COL));
		assertEquals(0L, model.getValueAt(0, VALUE_COL));

		addEnumValue();

		assertEquals("New_Name_(1)", model.getValueAt(1, NAME_COL));
		assertEquals(1L, model.getValueAt(1, VALUE_COL));

		addEnumValue();

		assertEquals("New_Name_(2)", model.getValueAt(2, NAME_COL));
		assertEquals(2L, model.getValueAt(2, VALUE_COL));

		editValueInTable(1, "0x5");

		// 5 gets moved to the end
		assertEquals(5L, model.getValueAt(2, VALUE_COL));

		// apply the change
		runSwing(() -> applyAction.actionPerformed(new DefaultActionContext()));
		program.flushEvents();
		waitForSwing();

		Enum en = (Enum) category.getDataType("TestEnum");
		String[] names = en.getNames();
		assertEquals(3, names.length);
		assertEquals(5, en.getValue("New_Name_(1)"));
	}
Tests for editing an Enumerated data type.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/datamgr/editor/EnumEditor1Test.java