@Test
	public void testChangesBeforeUndoYes() throws Exception {

		editSampleEnum();

		EnumEditorPanel panel = findEditorPanel(tool.getToolFrame());
		JTable table = panel.getTable();
		EnumTableModel model = (EnumTableModel) table.getModel();

		int origRowCount = model.getRowCount();
		runSwing(() -> {
			DockingActionIf action = getAddAction();
			action.actionPerformed(new DefaultActionContext());
			action.actionPerformed(new DefaultActionContext());
		});
		waitForSwing();
		applyChanges(true);
		// make more changes
		runSwing(() -> {
			DockingActionIf action = getAddAction();
			action.actionPerformed(new DefaultActionContext());
			action.actionPerformed(new DefaultActionContext());
		});
		waitForSwing();
		undo(false);
		OptionDialog d = waitForDialogComponent(OptionDialog.class);
		assertNotNull(d);
		// yes to reload the enum data type
		JButton button = findButtonByText(d.getComponent(), "Yes");
		assertNotNull(button);
		runSwing(() -> button.getActionListeners()[0].actionPerformed(null));
		waitForSwing();
		assertEquals(origRowCount, model.getRowCount());
	}
{@link AbstractEnumEditorUndoRedoTest} contains tests which should be applied to the various 
{@link DataTypeManager} implementations which are responsible for setting {@code dtm} during
the setUp phase.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/datamgr/editor/AbstractEnumEditorUndoRedoTest.java