PrivilegeImpl implements Privilege { @Override public String getName() { try { return session.getNamespacePrefix(URI) + ":" + name; } catch (Exception e) { return null; } } PrivilegeImpl(Session session, String name, Privilege[] declaredPrivileges);  PrivilegeImpl(Session session, String name, Privilege[] declaredPrivileges, boolean isAbstract); String localName(); @Override String getName(); @Override boolean isAbstract(); @Override boolean isAggregate(); @Override Privilege[] getDeclaredAggregatePrivileges(); @Override Privilege[] getAggregatePrivileges(); boolean contains(Privilege p); @Override String toString(); @Override boolean equals(Object other); @Override int hashCode();  }
@Test public void testGetName() { assertEquals("jcr:p1", p1.getName()); }