@Test
    public void testBytesSerializationUnsecure() {
        var h = new JavaSerializer();
        h.clearTrustedClasses();
        h.clearTrustedPackages();
        val profile = getUserProfile();
        val serialized = h.serializeToBytes(profile);
        assertNull(h.deserializeFromBytes(serialized));
    }
Tests {@link JavaSerializer}.

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