/** {@inheritDoc} */ public void handleStatusNotification(AccountStatusNotification notification) { notificationsProcessed.incrementAndGet(); assertNotNull(notification); assertNotNull(notification.getNotificationType()); assertNotNull(notification.getUserDN()); assertNotNull(notification.getUserEntry()); assertNotNull(notification.getMessage()); assertNotNull(notification.getNotificationProperties()); assertNotNull(notification.getNotificationProperties().get(PASSWORD_POLICY_DN)); switch (notification.getNotificationType()) { case ACCOUNT_TEMPORARILY_LOCKED: assertNotNull(notification.getNotificationProperties().get(ACCOUNT_UNLOCK_TIME)); assertNotNull(notification.getNotificationProperties().get(SECONDS_UNTIL_UNLOCK)); assertNotNull(notification.getNotificationProperties().get(TIME_UNTIL_UNLOCK)); break; case PASSWORD_EXPIRING: assertNotNull(notification.getNotificationProperties().get(PASSWORD_EXPIRATION_TIME)); assertNotNull(notification.getNotificationProperties().get(SECONDS_UNTIL_EXPIRATION)); assertNotNull(notification.getNotificationProperties().get(TIME_UNTIL_EXPIRATION)); break; case PASSWORD_CHANGED: case PASSWORD_RESET: // Note that the old password may not always be available, so we // can't check for it. assertNotNull(notification.getNotificationProperties().get(NEW_PASSWORD)); break; } }