class ExecuteAttributeQueryRequest {

    public Element execute(SessionId sessionId, AttributeQueryContainerDto attributeQueryContainerDto) {

        LOG.info("Validating attribute query {}", attributeQueryContainerDto.getId());
        Element matchingServiceRequest = convertToElementAndValidate(attributeQueryContainerDto);

        LOG.info("Sending attribute query {}", attributeQueryContainerDto.getId());
        final Element responseFromMatchingService = attributeQueryRequestClient.sendQuery(
                matchingServiceRequest,
                attributeQueryContainerDto.getId(),
                sessionId,
                attributeQueryContainerDto.getMatchingServiceUri());

        validateResponseSignature(responseFromMatchingService);

        return responseFromMatchingService;
    }

    @Inject public  ExecuteAttributeQueryRequest(Function<Element, AttributeQuery> elementToAttributeQueryTransformer,
                                        Function<Element, Response> elementToSamlResponseTransformer,
                                        @Named("matchingRequestSignatureValidator") SamlMessageSignatureValidator matchingRequestSignatureValidator,
                                        @Named("matchingResponseSignatureValidator") SamlMessageSignatureValidator matchingResponseSignatureValidator,
                                        AttributeQueryRequestClient attributeQueryRequestClient,
                                        ProtectiveMonitoringLogger protectiveMonitoringLogger);

}