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

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

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

		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();

		String editName = "New_Name_(1)";
		assertEquals(editName, 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));

		int row = getRowFor(editName);

		editValueInTable(row, "0xfff777777");

		row = getRowFor(editName); // the row may have changed if we are sorted on the values col
		assertEquals(0xfff77777L, model.getValueAt(row, VALUE_COL));
	}
Tests for editing an Enumerated data type.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/datamgr/editor/EnumEditor1Test.java