class ResponseAssertionsFromCountryValidator {

    public void validate(ValidatedResponse validatedResponse, Assertion validatedIdentityAssertion) {

        assertionValidator.validateEidas(
            validatedIdentityAssertion,
            validatedResponse.getInResponseTo(),
            expectedRecipientId
        );

        if (validatedResponse.isSuccess()) {

            if (validatedIdentityAssertion.getAuthnStatements().size() > 1) {
                SamlValidationSpecificationFailure failure = SamlTransformationErrorFactory.multipleAuthnStatements();
                throw new SamlTransformationErrorException(failure.getErrorMessage(), failure.getLogLevel());
            }

            authnStatementAssertionValidator.validate(validatedIdentityAssertion);
            eidasAttributeStatementAssertionValidator.validate(validatedResponse, validatedIdentityAssertion);
            authnResponseIssuerValidator.validate(validatedResponse, validatedIdentityAssertion);
        }
    }

    public  ResponseAssertionsFromCountryValidator(
        IdentityProviderAssertionValidator assertionValidator,
        EidasAttributeStatementAssertionValidator eidasAttributeStatementAssertionValidator,
        AuthnStatementAssertionValidator authnStatementAssertionValidator,
        EidasAuthnResponseIssuerValidator authnResponseIssuerValidator,
        String expectedRecipientId);

}