@SuppressWarnings("unchecked")
	private void assertOnlyOneProviderToolbarAction() {

		DockingWindowManager dwm = tool.getWindowManager();
		ActionToGuiMapper guiActions =
			(ActionToGuiMapper) getInstanceField("actionToGuiMapper", dwm);
		GlobalMenuAndToolBarManager menuManager =
			(GlobalMenuAndToolBarManager) getInstanceField("menuAndToolBarManager", guiActions);

		Map<WindowNode, WindowActionManager> windowToActionManagerMap =
			(Map<WindowNode, WindowActionManager>) getInstanceField("windowToActionManagerMap",
				menuManager);

		ProgramByteViewerComponentProvider provider = plugin.getProvider();
		DockingActionIf showAction =
			(DockingActionIf) getInstanceField("showProviderAction", provider);
		String actionName = showAction.getName();
		List<DockingActionIf> matches = new ArrayList<>();
		for (WindowActionManager actionManager : windowToActionManagerMap.values()) {

			ToolBarManager toolbarManager =
				(ToolBarManager) getInstanceField("toolBarMgr", actionManager);
			Map<String, List<ToolBarItemManager>> groupToItems =
				(Map<String, List<ToolBarItemManager>>) getInstanceField("groupToItemsMap",
					toolbarManager);

			Collection<List<ToolBarItemManager>> values = groupToItems.values();
			for (List<ToolBarItemManager> list : values) {
				for (ToolBarItemManager manager : list) {
					DockingActionIf action = manager.getAction();
					if (actionName.equals(action.getName())) {
						matches.add(action);
					}
				}
			}
		}

		assertEquals("Should only have 1 action on toolbar to show the provider", 1,
			matches.size());
	}
Basic tests for the byte view plugin
Ghidra/Features/ByteViewer/src/test.slow/java/ghidra/app/plugin/core/byteviewer/ByteViewerPlugin1Test.java