protected void storeMessage(final SAML2MessageContext context, final T request) {
        val messageStorage = context.getSamlMessageStore();
        if (messageStorage != null) {
            if (request instanceof RequestAbstractType requestAbstractType) {
                messageStorage.set(requestAbstractType.getID(), request);
            } else if (request instanceof StatusResponseType statusResponseType) {
                messageStorage.set(statusResponseType.getID(), request);
            }
        }
    }
<p>storeMessage.</p>

@param context a {@link SAML2MessageContext} object
@param request a T object
pac4j-saml/src/main/java/org/pac4j/saml/profile/impl/AbstractSAML2MessageSender.java