@Test
	public void testExistingDtEditInternalStructureOnSelectionVariousNames() throws Exception {
		init(simpleStructure, pgmBbCat);

		assertEquals(8, getModel().getNumComponents());

		setSelection(new int[] { 1, 2, 3 });
		DataType originalDt1 = getDataType(1);
		DataType originalDt2 = getDataType(2);
		DataType originalDt3 = getDataType(3);
		DataType originalDt4 = getDataType(4);

		// Make selected components into internal structure.
		invoke(createInternalStructureAction, false);

		// Specify name for structure.
		InputDialog inputDialog = waitForDialogComponent(InputDialog.class);
		assertNotNull(inputDialog);

		JTextField[] textFields = (JTextField[]) getInstanceField("textFields", inputDialog);
		JTextField textField = textFields[0];
		triggerText(textField, "simpleStructure");
		pressButtonByText(inputDialog, "OK");
		waitForSwing();

		assertEquals("The name cannot match the external structure name.",
			getStatusText(inputDialog));
		assertTrue(inputDialog.isShowing());

		setText(textField, "simpleUnion");
		pressButtonByText(inputDialog, "OK");
		assertEquals("A data type named \"simpleUnion\" already exists.",
			getStatusText(inputDialog));
		assertTrue(inputDialog.isShowing());

		setText(textField, "Foo");
		pressButtonByText(inputDialog, "OK");
		assertEquals(" ", getStatusText(inputDialog));
		assertFalse(inputDialog.isShowing());
		waitForTasks();

		assertEquals(6, getModel().getNumComponents());
		Structure internalStruct = (Structure) getDataType(1);
		assertEquals("Foo", internalStruct.getName());
		assertEquals(3, internalStruct.getNumComponents());
		DataType internalDt0 = internalStruct.getComponent(0).getDataType();
		DataType internalDt1 = internalStruct.getComponent(1).getDataType();
		DataType internalDt2 = internalStruct.getComponent(2).getDataType();
		assertTrue(internalDt0.isEquivalent(originalDt1));
		assertTrue(internalDt1.isEquivalent(originalDt2));
		assertTrue(internalDt2.isEquivalent(originalDt3));
		assertEquals(7, getDataType(1).getLength());
		assertEquals(7, getModel().getComponent(1).getLength());
		assertEquals(originalDt4, getDataType(2));
		assertEquals(29, getModel().getLength());
	}
Edit an existing structure and create a structure from a selection. Use the conflicting 
names followed by a good non-default name.
@throws Exception if the test throws an exception
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/compositeeditor/StructureEditorLockedActions3Test.java