@Test
    public void verifySerialization() {
        var mockWebContext = MockWebContext.create();
        Serializable credentials = new SAML2Credentials(LogoutType.BACK,
            new SAML2MessageContext(new CallContext(mockWebContext, new MockSessionStore())));
        val data = SerializationUtils.serialize(credentials);
        assertNotNull(data);
    }
This is {@link SAML2CredentialsSerializationTests}.

@author Misagh Moayyed
pac4j-saml/src/test/java/org/pac4j/saml/credentials/SAML2CredentialsSerializationTests.java