restrictions.put("rep:glob", vf.createValue("*/social/relationships/following/*"));
tmpl.addEntry(EveryonePrincipal.getInstance(), new Privilege[]{acMgr.privilegeFromName(Privilege.JCR_READ)}, true, restrictions);
acMgr.setPolicy(tmpl.getPath(), tmpl);
adminSession.save();
Session anonymousSession = getRepository().login(new GuestCredentials());
QueryManager qm = anonymousSession.getWorkspace().getQueryManager();
Query q = qm.createQuery("/jcr:root/home//social/relationships/following//*[@id='aaron.mcdonald@mailinator.com']", Query.XPATH);
QueryResult r = q.execute();
RowIterator it = r.getRows();
Assert.assertTrue(it.hasNext());