@Test
	public void testChangeEnumSizeAndInStructure() throws Exception {

		Category category = program.getListing()
				.getDataTypeManager()
				.getCategory(new CategoryPath(CategoryPath.ROOT, "Category1"));
		Enum enumm = createEnum(category, "EnumX", 2);

		tx(program, () -> {
			enumm.add("Zero", 0);
			enumm.add("One", 1);

			Structure structX = new StructureDataType("StructX", 0);
			structX.setPackingEnabled(true);
			structX.add(new ByteDataType());
			structX.add(enumm);
			structX.add(new ByteDataType());
			category.addDataType(structX, DataTypeConflictHandler.DEFAULT_HANDLER);

			Structure structY = new StructureDataType("StructY", 0);
			structY.setPackingEnabled(false);
			structY.add(new ByteDataType());
			structY.add(enumm);
			category.addDataType(structY, DataTypeConflictHandler.DEFAULT_HANDLER);
		});

		edit(enumm);

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

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

		runSwing(() -> {
			sizeComboBox.setSelectedItem(4);
		});
		apply();

		// size should be "4"
		selectedItem = sizeComboBox.getSelectedItem();
		intValue = Integer.parseInt(selectedItem.toString());
		assertEquals(intValue, 4);

		Structure structX = (Structure) category.getDataType("StructX");
		assertTrue(structX.isPackingEnabled());
		assertEquals(3, structX.getNumComponents());
		assertEquals(1, structX.getComponent(0).getLength());
		assertEquals(4, structX.getComponent(1).getLength());
		assertEquals(1, structX.getComponent(2).getLength());
		assertEquals(12, structX.getLength());

		Structure structY = (Structure) category.getDataType("StructY");
		assertFalse(structY.isPackingEnabled());
		assertEquals(2, structY.getNumComponents());
		assertEquals(1, structY.getComponent(0).getLength());
		assertEquals(4, structY.getComponent(1).getLength());
		assertEquals(5, structY.getLength());
	}
Tests for editing an Enumerated data type.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/datamgr/editor/EnumEditor1Test.java