@Test
    public void testBytesSerialization() {
        val profile = getUserProfile();
        val serialized = helper.serializeToBytes(profile);
        UserProfile profile2 = (CommonProfile) helper.deserializeFromBytes(serialized);
        assertEquals(profile.getId(), profile2.getId());
        assertEquals(profile.getAttribute(NAME), profile2.getAttribute(NAME));
    }
Tests {@link JavaSerializer}.

@author Jerome Leleu
@since 1.8.1
pac4j-core/src/test/java/org/pac4j/core/util/serializer/JavaSerializerTests.java