@Test
	public void testCreateEnumFromSelectionDupeEntryNameOrValue() throws Exception {

		// This test tests handing of duplicate entry names and values
		// duplicate value different name - add both
		// duplicate name and value - just add one entry with that combo
		// duplicate name different value - add second name with _ appended and a comment to
		// indicate change

		createTwoEnumsWithDuplicateNamesAndValues();

		createEnumFromSelection();

		Window window = waitForWindow("Enter Enum Name");
		JTextField tf = findComponent(window, JTextField.class);
		assertNotNull(tf);

		String newEnumName = "myNewEnum";
		setText(tf, newEnumName);
		pressButtonByText(window, "OK");
		assertFalse(window.isShowing());
		waitForTree();

		Window dialog = waitForWindowByTitleContaining("Duplicate Entry");
		close(dialog);

		Enum newEnum = getEnum(newEnumName);
		long values[] = newEnum.getValues();
		assertEquals(values.length, 7);
		String names[] = newEnum.getNames();
		assertEquals(names.length, 8);

		assertEquals(newEnum.getName(0x00L), "Red");
		assertEquals(newEnum.getName(0x5L), "Green_"); // underscore for name conflict
		assertEquals(newEnum.getName(0x10L), "Black"); // getName() return first alphabetically
		assertEquals(newEnum.getName(0x20L), "Blue");
		assertEquals(newEnum.getName(0x30L), "Purple");
		assertEquals(newEnum.getName(0x40L), "White");
		assertEquals(newEnum.getName(0x50L), "Yellow");

		String[] namesfor10 = newEnum.getNames(0x10);
		assertEquals(namesfor10.length, 2);
		assertEquals(namesfor10[0], "Black");
		assertEquals(namesfor10[1], "Green");

		assertEquals(newEnum.getValue("Red"), 0x00L);
		assertEquals(newEnum.getValue("Green_"), 0x5L); // underscore for name conflict
		assertEquals(newEnum.getValue("Green"), 0x10L);
		assertEquals(newEnum.getValue("Black"), 0x10L);
		assertEquals(newEnum.getValue("Blue"), 0x20L);
		assertEquals(newEnum.getValue("Purple"), 0x30L);
		assertEquals(newEnum.getValue("White"), 0x40L);
		assertEquals(newEnum.getValue("Yellow"), 0x50L);
	}
Tests for the 'make enum from a selection' action
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/datamgr/CreateEnumFromSelectionTest.java