TrustedUserPrincipal extends Principal { @Override public String getType() { return "trusteduser"; } TrustedUserPrincipal(String username); String getUsername(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String getType(); @Override String getName(); @Override boolean hasFullAccess(); @Override boolean canAccess(Object target, SubResource subResource, Access access);  }
@Test public void type() { assertEquals("trusteduser", principal.getType()); }