@Test
	public void testMultiSelectionFavorites() throws Exception {
		// select some favorites and some not favorites
		// favorites action should be disabled
		tree.expandPath(builtInNode);
		waitForTree();
		DataTypeNode node1 = (DataTypeNode) builtInNode.getChild("PascalUnicode");
		DataTypeNode node2 = (DataTypeNode) builtInNode.getChild("undefined1");
		DataTypeNode node3 = (DataTypeNode) builtInNode.getChild("byte");

		tree.setSelectionPaths(new TreePath[] { node1.getTreePath(), node2.getTreePath() });
		waitForTree();

		assertTrue(favoritesAction.isEnabledForContext(createContext(node2)));

		// Invalid selection - mixed favorite and non-favorite
		tree.setSelectionPaths(
			new TreePath[] { node1.getTreePath(), node2.getTreePath(), node3.getTreePath() });
		waitForTree();

		assertFalse(favoritesAction.isEnabledForContext(createContext(node3)));

		// Valid
		tree.setSelectionPaths(new TreePath[] { node1.getTreePath(), node2.getTreePath() });
		waitForTree();

		assertTrue(favoritesAction.isEnabledForContext(createContext(node2)));

		// now make sure that a mixture of node types is not a valid context
		tree.setSelectionPaths(
			new TreePath[] { node1.getTreePath(), node2.getTreePath(), builtInNode.getTreePath() });
		waitForTree();

		assertFalse(favoritesAction.isEnabledForContext(createContext(node2)));
	}
Test the favorites and data manager services.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/datamgr/FavoritesAndMiscTest.java