@Test(expectedExceptions = ConditionEvaluationFailedException.class)
public void testCheckConditionWhenSyntaxExceptionShouldThrowException() throws SaxonApiException {

    //GIVEN
    parameterList.addParameter(new Parameter("xquery", QUERY));
    given(request.getHeader(CONTENT_TYPE_HEADER)).willReturn(FASTINFOSET_CONTENT);
    given(request.getBody()).willReturn(BODY);
    given(queryExpressionEvaluator.evaluateXQuery(BODY, QUERY)).willThrow(new SaxonApiException("exception"));
    //WHEN
    underTest.checkCondition(request, parameterList);
    //THEN exception should be thrown
}