@Test
public void testMultipleLevelsScopeTree() {

	List<String> scopeAliasesList = Arrays.asList(
		"everything.read", "everything.write", "everything",
		"everything.read.user", "everything.read.user.documents");
	Tree.Node<String> node = ScopeTreeUtil.getScopeAliasTreeNode(
		scopeAliasesList, _scopeMatcherFactory);
	Assert.assertEquals(StringPool.BLANK, node.getValue());
	Tree<String> tree = _getTree(node, 0);
	Assert.assertEquals("everything", tree.getValue());
	Assert.assertFalse(tree instanceof Tree.Leaf);
	Tree<String> firstChildTree = _getTree((Tree.Node<String>)tree, 0);
	Assert.assertEquals("everything.read", firstChildTree.getValue());
	Assert.assertFalse(firstChildTree instanceof Tree.Leaf);
	Tree<String> firstGrandChildTree = _getTree(
		(Tree.Node<String>)firstChildTree, 0);
	Assert.assertEquals(
		"everything.read.user", firstGrandChildTree.getValue());
	Assert.assertFalse(firstGrandChildTree instanceof Tree.Leaf);
	Tree<String> greatGrandChildTree = _getTree(
		(Tree.Node<String>)firstGrandChildTree, 0);
	Assert.assertEquals(
		"everything.read.user.documents", greatGrandChildTree.getValue());
	Tree<String> lastChildTree = _getLastTree((Tree.Node<String>)tree);
	Assert.assertEquals("everything.write", lastChildTree.getValue());
	Assert.assertTrue(lastChildTree instanceof Tree.Leaf);
}