private void assertInitWithDerEncoded(
            byte[] encoded, PSSParameterSpec expected) throws Exception {
        AlgorithmParameters params = AlgorithmParameters.getInstance("PSS");
        params.init(encoded);
        assertPSSParameterSpecEquals(expected, params.getParameterSpec(PSSParameterSpec.class));

        params = AlgorithmParameters.getInstance("PSS");
        params.init(encoded, "ASN.1");
        assertPSSParameterSpecEquals(expected, params.getParameterSpec(PSSParameterSpec.class));
    }
Payload of SEQUENCE extends beyond the SEQUENCE.
common/src/test/java/org/conscrypt/java/security/AlgorithmParametersPSSTest.java