class NotOnOrAfterLogger {

    public static void logAssertionNotOnOrAfter(final Assertion assertion, String typeOfAssertion) {
        final String idp = assertion.getIssuer().getValue();
        assertion.getSubject().getSubjectConfirmations()
                .forEach(subjectConfirmation -> {
                    DateTime notOnOrAfter = subjectConfirmation.getSubjectConfirmationData().getNotOnOrAfter();
                    LOGGER.info(String.format("NotOnOrAfter in %s from %s is set to %s", typeOfAssertion, idp, notOnOrAfter.toString(dateTimeFormatter)));
                });
    }

}