@Test
public void shouldNotSetExpiredPasswordWhenPwdGraceUseTimeIsActive(){

    Attribute noPwdGrace = new BasicAttribute("noPwdGrace");
    Attributes attributes = new BasicAttributes();
    attributes.put(noPwdGrace);
    when(ldapUserDetails.getAttributes()).thenReturn(attributes);
    User userForTest = getUserForTest();
    Boolean passExpired = sut.checkExpiredPassword(ldapUserDetails.getAttributes());
    userForTest.setPasswordExpired(passExpired);
    assertThat(passExpired ,is(false));
}