@Test public void shouldApplyUpdate() throws NamingException { assertThat(user.isPasswordExpired(), is(Boolean.TRUE)); assertThat(user.getLdapPassword(), is(PASSWORD)); Attribute newPasswordAttribute = new BasicAttribute("userPassword", NEW_PASSWORD); ModificationItem[] mods = new ModificationItem[1]; mods[0] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, newPasswordAttribute); try { dirContext.modifyAttributes(user.getLdapName(), mods); } catch (NamingException e) { AuthenticationManagerLdapImpl.log.error(e); throw e; } user.setPasswordExpired(Boolean.FALSE); user.setLdapPassword(NEW_PASSWORD); assertThat(user.isPasswordExpired(), is(Boolean.FALSE)); assertThat(user.getLdapPassword(), is(NEW_PASSWORD)); }
protected void modifyAttributes(DirContext dirContext, User user, ModificationItem[] mods) throws NamingException { dirContext.modifyAttributes(user.getLdapName(), mods); }
AuthenticationManagerLdapTemplate { protected void modifyAttributes(DirContext dirContext, User user, ModificationItem[] mods) throws NamingException { dirContext.modifyAttributes(user.getLdapName(), mods); } }
AuthenticationManagerLdapTemplate { protected void modifyAttributes(DirContext dirContext, User user, ModificationItem[] mods) throws NamingException { dirContext.modifyAttributes(user.getLdapName(), mods); }  }
AuthenticationManagerLdapTemplate { protected void modifyAttributes(DirContext dirContext, User user, ModificationItem[] mods) throws NamingException { dirContext.modifyAttributes(user.getLdapName(), mods); }  void changePassword(final User user, final String password); }
AuthenticationManagerLdapTemplate { protected void modifyAttributes(DirContext dirContext, User user, ModificationItem[] mods) throws NamingException { dirContext.modifyAttributes(user.getLdapName(), mods); }  void changePassword(final User user, final String password);  }