class CustomXQueryBodyChecker implements ConditionChecker {

    @Override
    public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) {
        List<Parameter> params = parameterList.getAllParameters();
        boolean result = false;
        if (params.size() == 1) {
            String contentType = request.getHeader(CONTENT_TYPE_HEADER);
            if (contentType != null && (contentType.contains(XML_CONTENT) || FASTINFOSET_CONTENT.equals(contentType))) {
                try {
                    Parameter paramater = params.iterator().next();
                    String value = paramater.getValue();
                    result = evaluateCondition(request.getBody(), value);
                } catch (SaxonApiException e) {
                    throw new ConditionEvaluationFailedException("XQuery evaluation failed at request: " + request.getWilmaMessageLoggerId(), e);
                }
            }
        } else {
            throw new ConditionEvaluationFailedException("Please provide exactly one parameter in Stub Configuration!");
        }
        return result;
    }

}