EveryonePrincipal implements JackrabbitPrincipal, GroupPrincipal { @Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj instanceof JackrabbitPrincipal && GroupPrincipals.isGroup((Principal) obj)) { JackrabbitPrincipal other = (JackrabbitPrincipal) obj; return NAME.equals(other.getName()); } return false; } private  EveryonePrincipal(); static EveryonePrincipal getInstance(); @Override String getName(); @Override boolean isMember(@NotNull Principal member); @NotNull @Override Enumeration<? extends Principal> members(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static final String NAME; }
@Test public void testEquals() { assertEquals(everyone, EveryonePrincipal.getInstance()); }