@Test
	public void testRenameViewDuplicate() throws Exception {

		env.showTool();

		waitForTasks();
		waitForSwing();

		setCurrentViewProvider(DEFAULT_TREE_NAME);

		DockingActionIf renameAction = getAction(plugin, "Rename Tree View");
		performAction(renameAction, false);

		InputDialog dialog = waitForDialogComponent(InputDialog.class);
		dialog.setValue("Main Tree");
		pressButtonByText(dialog, "OK");
		waitForProgram(program);

		ViewProviderService vps = provider.getCurrentViewProvider();
		assertEquals(DEFAULT_TREE_NAME, vps.getViewName());
		assertTrue(provider.getCurrentView().hasSameAddresses(cb.getView()));
		assertTrue(provider.getCurrentView().hasSameAddresses(vps.getCurrentView()));
	}
Test the view manager plugin that controls the view in the browser and the
program tree.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/programtree/ViewManagerPluginTest.java