@Test
	public void testDeleteLastView() throws Exception {
		final DockingActionIf deleteAction = getAction(plugin, "Delete Tree View");

		setCurrentViewProvider("Main Tree");

		performAction(deleteAction);
		waitForBusyTool(tool);

		setCurrentViewProvider("Tree One");

		performAction(deleteAction);
		waitForBusyTool(tool);

		setCurrentViewProvider("Tree Two");

		performAction(deleteAction);
		waitForBusyTool(tool);

		setCurrentViewProvider("Tree Three");

		performAction(deleteAction);
		waitForBusyTool(tool);

		// attempt to delete the last view
		performAction(deleteAction);
		waitForBusyTool(tool);

		ViewProviderService vps = provider.getCurrentViewProvider();
		assertEquals(DEFAULT_TREE_NAME, vps.getViewName());
		assertEquals(tabbedPane.getSelectedComponent(), vps.getViewComponent());
		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