AuthorizableImpl implements Authorizable { @NotNull @Override public Principal getPrincipal() throws RepositoryException { return dlg.getPrincipal(); } AuthorizableImpl(Authorizable dlg, AutoSaveEnabledManager mgr); @NotNull @Override String getID(); @Override boolean isGroup(); @NotNull @Override Principal getPrincipal(); @NotNull @Override Iterator<Group> declaredMemberOf(); @NotNull @Override Iterator<Group> memberOf(); @Override void remove(); @NotNull @Override Iterator<String> getPropertyNames(); @NotNull @Override Iterator<String> getPropertyNames(@NotNull String s); @Override boolean hasProperty(@NotNull String s); @Override void setProperty(@NotNull String s, @Nullable Value value); @Override void setProperty(@NotNull String s, @Nullable Value[] values); @Nullable @Override Value[] getProperty(@NotNull String s); @Override boolean removeProperty(@NotNull String s); @NotNull @Override String getPath(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }
@Test public void testGetPrincipal() throws Exception { assertEquals(dlg.getPrincipal(), a.getPrincipal()); verify(dlg, times(2)).getPrincipal(); verify(autosaveMgr, never()).autosave(); }