@Test
    public void invalidSignature() {
        // Mutate the signature of VALID_CERT slightly
        int index = VALID_CERT.lastIndexOf('9');
        assertTrue(index > 0);
        String invalidCert = VALID_CERT.substring(0, index) + "8" + VALID_CERT.substring(index + 1);
        ServiceTester.test("CertificateFactory")
            .withAlgorithm("X509")
            .run((p, algorithm) -> {
                X509Certificate c = certificateFromPEM(p, invalidCert);
                assertThrows(SignatureException.class, () -> c.verify(c.getPublicKey()));
            });
    }
Confirm that explicit EC params aren't accepted in certificates.
common/src/test/java/org/conscrypt/java/security/cert/X509CertificateTest.java