public void validateSamlRequest(SamlRequest samlRequest, Signature signature) throws SamlValidationException {
        try {
            SAMLSignatureProfileValidator profileValidator = new SAMLSignatureProfileValidator();
            profileValidator.validate(signature);
        } catch (SignatureException e) {
            throw new SamlValidationException("Request check signature handler exception", e);
        }

        List<Credential> credentials = retrieveServiceProviderCredentials(samlRequest.getConnectionEntity());
        boolean canValidateWithOneOfTheCredentails = credentials.stream().anyMatch(credential -> {
            try {
                SignatureValidator.validate(signature, credential);
                return true;
            } catch (SignatureException e) {
                return false;
            }
        });

        if (!canValidateWithOneOfTheCredentails)
            throw new SamlValidationException("Request check signature handler exception");
    }
@Test
    public void verifyRequestSignatureValid() throws SamlValidationException {
        assertDoesNotThrow(() -> signatureService.validateSamlRequest(null, null));
    }