UserImpl extends AuthorizableImpl implements User { @NotNull @Override public Credentials getCredentials() throws RepositoryException { return getDelegate().getCredentials(); } UserImpl(User dlg, AutoSaveEnabledManager mgr); @Override boolean isAdmin(); @Override boolean isSystemUser(); @NotNull @Override Credentials getCredentials(); @NotNull @Override Impersonation getImpersonation(); @Override void changePassword(@Nullable String pw); @Override void changePassword(@Nullable String pw, @NotNull String oldPw); @Override void disable(@Nullable String msg); @Override boolean isDisabled(); @Nullable @Override String getDisabledReason();  }
@Test public void testGetCredentials() throws RepositoryException { assertEquals(dlg.getCredentials().getClass().getName(), user.getCredentials().getClass().getName()); verify(dlg, times(2)).getCredentials(); verify(autosaveMgr, never()).autosave(); }