@Test
    public void testReadWriteObjectNullTokens() {
        var profile = new OidcProfile();
        profile.setAccessToken(populatedAccessToken);
        profile.removeLoginData();

        var result = JAVA_SERIALIZER.serializeToBytes(profile);
        profile = (OidcProfile) JAVA_SERIALIZER.deserializeFromBytes(result);
        assertNull(profile.getAccessToken());
        assertNull(profile.getIdTokenString());
        assertNull(profile.getRefreshToken());
    }
Test that serialization and deserialization of the OidcProfile work when tokens are null, after a call
to clearSensitiveData().
pac4j-oidc/src/test/java/org/pac4j/oidc/profile/OidcProfileTests.java