private void setCurrentViewProvider(final String viewName) {
		final AtomicReference<ViewProviderService> ref = new AtomicReference<>();
		runSwing(() -> {
			provider.setCurrentViewProvider(viewName);
			ref.set(provider.getCurrentViewProvider());
		});

		ViewProviderService newProvider = ref.get();
		assertEquals("Did not find the tree view provider: " + viewName, viewName,
			newProvider.getViewName());
	}
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