@Test
	public void testCloseView() throws Exception {
		// close "Program Tree"
		final DockingActionIf closeAction = getAction(plugin, "Close Tree View");
		performAction(closeAction);

		waitForBusyTool(tool);

		String[] treeNames = program.getListing().getTreeNames();
		assertEquals(treeNames.length - 1, tabbedPane.getTabCount());
		ViewProviderService vps = provider.getCurrentViewProvider();
		assertEquals(treeNames[1], vps.getViewName());
		assertEquals(tabbedPane.getSelectedComponent(), vps.getViewComponent());
		assertTrue(provider.getCurrentView().hasSameAddresses(cb.getView()));
		assertTrue(provider.getCurrentView().hasSameAddresses(vps.getCurrentView()));

		assertNotNull(program.getListing().getRootModule(DEFAULT_TREE_NAME));
	}
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