@ParameterizedTest
    @MethodSource("getTestParameters")
    void verifyAuthenticate(final X509CredentialsAuthenticationHandler handler, final Credential credential,
                                   final boolean expectedSupports, final AuthenticationHandlerExecutionResult expectedResult,
                                   final GeneralSecurityException expectedException) {
        assertThrowsOrNot(expectedException, () -> {
            if (expectedSupports) {
                assertTrue(handler.supports(credential));
                val result = handler.authenticate(credential, mock(Service.class));
                assertEquals(expectedResult, result);
            }
        });

        assertEquals(expectedSupports, handler.supports(credential));
        assertEquals(expectedSupports, handler.supports(credential.getClass()));
    }
Tests the {@link AuthenticationHandler#authenticate(Credential, Service)} method.
support/cas-server-support-x509-core/src/test/java/org/apereo/cas/adaptors/x509/authentication/handler/support/X509CredentialsAuthenticationHandlerTests.java