@Test(expected = UnsupportedOperationException.class)
    public void testTrustedPackagesModification() {
        var h = new JavaSerializer();
        h.getTrustedPackages().add("org.apache");
    }
Tests {@link JavaSerializer}.

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