@Test
	public void testSaveRestoreState() {

		setCurrentViewProvider("Main Tree");
		AddressSetView set = provider.getCurrentView();

		env.saveRestoreToolState();

		ViewProviderService vps = provider.getCurrentViewProvider();
		assertEquals("Main Tree", vps.getViewName());
		assertTrue(set.hasSameAddresses(provider.getCurrentView()));
		assertTrue(set.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