@Test
	public void testSymCategoryActionEnablement() throws Exception {
		// select the external symbol category;
		// no actions should be applicable
		showSymbolTree();
		GTreeNode extNode = rootNode.getChild(0);
		util.selectNode(extNode);
		ActionContext context = util.getSymbolTreeContext();
		boolean createLibraryIsEnabled = createLibraryAction.isEnabledForContext(context);
		if (extNode.getName().equals("Imports")) {
			assertTrue(createLibraryIsEnabled);
		}
		else {
			assertFalse(createLibraryIsEnabled);
		}
		assertFalse(createClassAction.isEnabledForContext(context));
		assertFalse(createNamespaceAction.isEnabledForContext(context));
		assertFalse(renameAction.isEnabledForContext(context));
		assertFalse(cutAction.isEnabledForContext(context));
		assertFalse(pasteAction.isEnabledForContext(context));
		assertFalse(deleteAction.isEnabledForContext(context));
		assertFalse(selectionAction.isEnabledForContext(context));

		GTreeNode lNode = rootNode.getChild(1);
		util.selectNode(lNode);
		context = util.getSymbolTreeContext();
		assertFalse(createLibraryAction.isEnabledForContext(context));
		assertFalse(createClassAction.isEnabledForContext(context));
		assertFalse(createNamespaceAction.isEnabledForContext(context));
		assertFalse(renameAction.isEnabledForContext(context));
		assertFalse(cutAction.isEnabledForContext(context));
		assertFalse(pasteAction.isEnabledForContext(context));
		assertFalse(deleteAction.isEnabledForContext(context));
		assertFalse(selectionAction.isEnabledForContext(context));
	}
Tests for the symbol tree plugin.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/symboltree/SymbolTreePlugin1Test.java