protected void assertCannotPerformSaveAsByName(final String name) {
		DockingActionIf newAction = getAction(plugin, "Save Script As");
		performAction(newAction, false);
		waitForSwing();

		final SaveDialog saveDialog = waitForDialogComponent(SaveDialog.class);
		final JTextField nameField = (JTextField) getInstanceField("nameField", saveDialog);
		runSwing(() -> {
			nameField.setText(name);
			saveDialog.okCallback();
		});

		String statusText = saveDialog.getStatusText();

		// cancel to prevent residual file creation after the test closes open dialogs
		runSwing(() -> saveDialog.cancelCallback());

		assertEquals("File already exists on disk.", statusText);
	}
This call will:
-open the file in an editor
-update the text area and buffer fields of this test
@param file the file to open
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/script/AbstractGhidraScriptMgrPluginTest.java