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

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

		// verify the name field; should be "TestEnum"
		JTextField nameField = getTextField(panel, "Name");
		assertNotNull(nameField);
		assertEquals("TestEnum", nameField.getText());
		assertTrue(nameField.isEditable());

		// description should be "Enumerated data type"
		JTextField descField = getTextField(panel, "Description");
		assertNotNull(descField);
		assertEquals("", descField.getText());
		assertTrue(descField.isEditable());

		// category should be notepad.xml/Category1
		JTextField catField = getTextField(panel, "Category");
		assertNotNull(catField);
		assertEquals("notepad/Category1", catField.getText());
		assertFalse(catField.isEditable());

		// size should be "1"
		@SuppressWarnings("unchecked")
		JComboBox<Object> sizeComboBox =
			(JComboBox<Object>) getInstanceField("sizeComboBox", panel);
		assertNotNull(sizeComboBox);
		Object selectedItem = sizeComboBox.getSelectedItem();
		int intValue = Integer.parseInt(selectedItem.toString());
		assertEquals(intValue, 1);

		// add action should be enabled
		// apply action should be disabled
		// delete action should be disabled
		DockingActionIf addAction = getAddAction();
		assertTrue(addAction.isEnabled());
		DockingActionIf applyAction = getApplyAction();
		assertFalse(applyAction.isEnabled());
		DockingActionIf deleteAction = getDeleteAction();
		assertFalse(deleteAction.isEnabled());

		// sort column should be on the value column
		JTable table = (JTable) findContainer(panel, JTable.class);
		EnumTableModel model = (EnumTableModel) table.getModel();
		assertEquals(VALUE_COL, model.getPrimarySortColumnIndex());
	}
Tests for editing an Enumerated data type.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/datamgr/editor/EnumEditor1Test.java